pub trait CommBusBackend: 'static {
type Error: Display + Debug;
type Subscription: 'static;
// Required methods
fn subscribe(
event: &str,
callback: impl Fn(&str) + 'static,
) -> Result<Self::Subscription, Self::Error>;
fn call(event: &str, data: &str) -> Result<(), Self::Error>;
}Required Associated Types§
Required Methods§
fn subscribe( event: &str, callback: impl Fn(&str) + 'static, ) -> Result<Self::Subscription, Self::Error>
fn call(event: &str, data: &str) -> Result<(), Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.