pub trait SubscriptionRegistration<T: Clone> {
    fn subscribe_with<F: FnMut(&mut Sender<T>)>(
        &self,
        f: &mut F
    ) -> Result<Receiver<T>, Error>; fn subscribe(&self) -> Result<Receiver<T>, Error> { ... } }
Expand description

A trait for subscribing to a broadcaster.

Required Methods§

Subscribe to a broadcaster and return the receiver. Calls a function on the newly created sender. If the associated broadcaster got dropped in the meantime, an error gets returned.

Provided Methods§

Subscribe to a broadcaster and return the receiver. If the associated broadcaster got dropped in the meantime, an error gets returned.

Implementations on Foreign Types§

Implementors§