Trait Rx

Source
pub trait Rx<M: RemoteMessage>: Debug {
    // Required methods
    fn recv<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<M, ChannelError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn addr(&self) -> ChannelAddr;
}
Expand description

The receive end of an M-typed channel.

Required Methods§

Source

fn recv<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<M, ChannelError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receive the next message from the channel. If the channel returns an error it is considered broken and should be discarded.

Source

fn addr(&self) -> ChannelAddr

The channel address from which this Rx is receiving.

Implementors§