pub trait WasmBox: 'static {
type Input: Serialize;
type Output: DeserializeOwned;
fn init(callback: Box<dyn Fn(Self::Output) + Send + Sync>) -> Self
where
Self: Sized;
fn message(&mut self, input: Self::Input);
}
pub trait WasmBox: 'static {
type Input: Serialize;
type Output: DeserializeOwned;
fn init(callback: Box<dyn Fn(Self::Output) + Send + Sync>) -> Self
where
Self: Sized;
fn message(&mut self, input: Self::Input);
}