pub trait Receiver<D: Data>: Sync + Send {
    // Required method
    fn next<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Option<D>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

For receiving arbitrary messages.

Required Methods§

source

fn next<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Option<D>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

source§

impl<D: Data> Receiver<D> for UnboundedReceiver<D>

source§

fn next<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Option<D>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

source§

impl<D: Data, R: Receiver<D>, FromD: Data + TryFrom<D>> Receiver<FromD> for MapReceiver<D, R>
where FromD::Error: Display,

source§

impl<LeftData: Data, RightData: Data, R: Receiver<Split<LeftData, RightData>>, TranslatedData: Data> Receiver<TranslatedData> for SplitReceiver<LeftData, RightData, R, TranslatedData>