Trait async_transmit::Transmit[][src]

pub trait Transmit {
    type Item;
    type Error;
    fn transmit<'life0, 'async_trait>(
        &'life0 mut self,
        item: Self::Item
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        Self::Item: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

The Transmit trait allows for transmitting item to a peer.

Implementors of the Transmit trait are called ‘transmitters’.

Transmitters are defined by one required method, [transmit()]. The method will attempt to transmit some data to a peer asynchronously, returning if the transmission has succeeded.

Associated Types

Required methods

Attempts to transmit a value to the peer asynchronously.

Implementations on Foreign Types

Implementors