Trait async_transmit::Transmit[][src]

#[must_use = "transmit do nothing unless polled"]pub trait Transmit {
    type Item;
    type Error;
#[must_use]    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
; }

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

Loading content...

Required methods

#[must_use]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, 
[src]

Attempts to transmit a value to the peer asynchronously.

Loading content...

Implementations on Foreign Types

impl<I> Transmit for Sender<I> where
    I: Send
[src]

type Item = I

type Error = SendError<I>

impl<I> Transmit for Sender<I> where
    I: Send
[src]

type Item = I

type Error = SendError<I>

impl<I> Transmit for UnboundedSender<I> where
    I: Send
[src]

type Item = I

type Error = SendError<I>

Loading content...

Implementors

impl<S, I> Transmit for FromSink<S, I, S::Error> where
    I: Send,
    S: Sink<I> + Unpin + Send,
    S::Error: Send
[src]

type Item = I

type Error = S::Error

impl<T, F, I, U, E> Transmit for With<T, F, I, U, E> where
    T: Transmit<Item = I, Error = E> + Send,
    F: FnMut(U) -> I + Send,
    I: Send,
    U: Send,
    E: Send
[src]

type Item = U

type Error = E

Loading content...