infinity_bridge_wasm/backend.rs
1use core::fmt;
2
3pub trait CommBusBackend: 'static {
4 type Error: fmt::Display + fmt::Debug;
5 type Subscription: 'static;
6
7 fn subscribe(
8 event: &str,
9 callback: impl Fn(&str) + 'static,
10 ) -> Result<Self::Subscription, Self::Error>;
11 fn call(event: &str, data: &str) -> Result<(), Self::Error>;
12}