[−][src]Trait lifeline::Receiver
The receiver half of an asynchronous channel, which may be bounded/unbounded, mpsc/broadcast/oneshot, etc.
This trait provides a consistent interface for all async receivers, which makes your app code
very robust to channel changes on the bus. It also allows impl Receiver<ExampleMessage>
in your associated function signatures.
Required methods
#[must_use]pub fn recv<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Implementations on Foreign Types
impl<T> Receiver<T> for Receiver<T> where
T: Debug + Send,
[src]
T: Debug + Send,
pub fn recv<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl<T> Receiver<T> for Receiver<T> where
T: Clone + Debug + Send,
[src]
T: Clone + Debug + Send,
pub fn recv<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl<T> Receiver<T> for Receiver<T> where
T: Clone + Debug + Send + Sync,
[src]
T: Clone + Debug + Send + Sync,
pub fn recv<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Implementors
impl<T, R> Receiver<T> for LifelineReceiver<T, R> where
T: Send + Debug,
R: Send + Receiver<T>,
[src]
T: Send + Debug,
R: Send + Receiver<T>,
pub fn recv<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<T>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,