Trait async_transmit::Transmit
source · pub trait Transmit {
type Item;
type Error;
// Required method
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,
Self: 'async_trait,
'life0: '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.