pub trait Subscribable: Transport {
// Required methods
fn subscribe<E, F>(&self, event: E, handler: F) -> Result<()>
where E: Event,
F: FnMut(E::Item) -> Result<()> + Send + Sync + 'static;
fn unsubscribe<E>(&self, event: E) -> Result<()>
where E: Event;
}Required Methods§
fn subscribe<E, F>(&self, event: E, handler: F) -> Result<()>
fn unsubscribe<E>(&self, event: E) -> Result<()>where
E: Event,
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.