instruments

This commit is contained in:
Christien Rioux 2024-07-03 21:00:12 -04:00
parent c69dabf721
commit 76f5052960
28 changed files with 997 additions and 757 deletions

View file

@ -58,6 +58,7 @@ impl DartIsolateWrapper {
Err(e) => self.err_json(e),
}
}
pub fn result_json<T: Serialize + Debug, E: Serialize + Debug>(
self,
result: Result<T, E>,
@ -67,6 +68,7 @@ impl DartIsolateWrapper {
Err(e) => self.err_json(e),
}
}
pub fn ok<T: IntoDart>(self, value: T) -> bool {
self.isolate
.post(vec![MESSAGE_OK.into_dart(), value.into_dart()])