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§
Sourcefn 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 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.
Sourcefn addr(&self) -> ChannelAddr
fn addr(&self) -> ChannelAddr
The channel address from which this Rx is receiving.