[][src]Trait ommui_broadcast::SubscriptionRegistration

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> { ... } }

A trait for subscribing to a broadcaster.

Required methods

fn subscribe_with<F: FnMut(&mut Sender<T>)>(
    &self,
    f: &mut F
) -> Result<Receiver<T>, Error>

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.

Loading content...

Provided methods

fn subscribe(&self) -> Result<Receiver<T>, Error>

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

Loading content...

Implementations on Foreign Types

impl<T: Clone> SubscriptionRegistration<T> for Sender<Sender<T>>[src]

fn subscribe(&self) -> Result<Receiver<T>, Error>[src]

Loading content...

Implementors

impl<T: Clone> SubscriptionRegistration<T> for Broadcaster<T>[src]

fn subscribe(&self) -> Result<Receiver<T>, Error>[src]

impl<T: Clone> SubscriptionRegistration<T> for SubscriptionManager<T>[src]

fn subscribe(&self) -> Result<Receiver<T>, Error>[src]

Loading content...