[−][src]Trait lifeline::Sender
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]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,
&'life0 mut self,
value: T
) -> Pin<Box<dyn Future<Output = Result<(), SendError<T>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Implementations on Foreign Types
impl<T> Sender<T> for Sender<T> where
T: Debug + Send,
[src]
T: Debug + Send,
fn send<'life0, 'async_trait>(
&'life0 mut self,
value: T
) -> Pin<Box<dyn Future<Output = Result<(), LifelineSendError<T>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
value: T
) -> Pin<Box<dyn Future<Output = Result<(), LifelineSendError<T>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl<T> Sender<T> for Sender<T> where
T: Debug + Send,
[src]
T: Debug + Send,
fn send<'life0, 'async_trait>(
&'life0 mut self,
value: T
) -> Pin<Box<dyn Future<Output = Result<(), LifelineSendError<T>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
value: T
) -> Pin<Box<dyn Future<Output = Result<(), LifelineSendError<T>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl<T> Sender<T> for Sender<T> where
T: Clone + Debug + Send + Sync,
[src]
T: Clone + Debug + Send + Sync,
fn send<'life0, 'async_trait>(
&'life0 mut self,
value: T
) -> Pin<Box<dyn Future<Output = Result<(), LifelineSendError<T>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
value: T
) -> Pin<Box<dyn Future<Output = Result<(), LifelineSendError<T>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Implementors
impl<T, S> Sender<T> for LifelineSender<T, S> where
T: Send + Debug,
S: Send + Sender<T>,
[src]
T: Send + Debug,
S: Send + Sender<T>,
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]
&'life0 mut self,
value: T
) -> Pin<Box<dyn Future<Output = Result<(), SendError<T>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,