[][src]Trait lifeline::Sender

pub trait Sender<T: Debug> {
#[must_use]    pub fn send<'life0, 'async_trait>(
        &'life0 mut self,
        value: T
    ) -> Pin<Box<dyn Future<Output = Result<(), SendError<T>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

The sender half of an asynchronous channel, which may be bounded/unbounded, mpsc/broadcast/oneshot, etc.

This trait provides a consistent interface for all async senders, which makes your app code very robust to channel changes on the bus. It also allows impl Sender<ExampleMessage> in your associated function signatures.

Required methods

#[must_use]pub fn send<'life0, 'async_trait>(
    &'life0 mut self,
    value: T
) -> Pin<Box<dyn Future<Output = Result<(), SendError<T>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Implementations on Foreign Types

impl<T> Sender<T> for Sender<T> where
    T: Debug + Send
[src]

impl<T> Sender<T> for Sender<T> where
    T: Debug + Send
[src]

impl<T> Sender<T> for Sender<T> where
    T: Clone + Debug + Send + Sync
[src]

Loading content...

Implementors

impl<T, S> Sender<T> for LifelineSender<T, S> where
    T: Send + Debug,
    S: Send + Sender<T>, 
[src]

impl<T: Clone + Debug + Default + Send + Sync> Sender<T> for Barrier<T>[src]

Loading content...