pub trait SubscriptionRegistration<T: Clone> {
// Required method
fn subscribe_with<F: FnMut(&mut Sender<T>)>(
&self,
f: &mut F,
) -> Result<Receiver<T>, Error>;
// Provided method
fn subscribe(&self) -> Result<Receiver<T>, Error> { ... }
}
Expand description
A trait for subscribing to a broadcaster.
Required Methods§
Provided Methods§
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.