Trait dialectic::backend::Transmitter[][src]

pub trait Transmitter {
    type Error;
    fn send_choice<'async_lifetime, const LENGTH: usize>(
        &'async_lifetime mut self,
        choice: Choice<LENGTH>
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_lifetime>>; }

A backend transport used for transmitting (i.e. the Tx parameter of Chan) must implement Transmitter, which specifies what type of errors it might return, as well as giving a method to send Choices across the channel. This is a super-trait of Transmit, which is what’s actually needed to receive particular values over a Chan.

If you’re writing a function and need a lot of different Transmit<T> bounds, the Transmitter attribute macro can help you specify them more succinctly.

Associated Types

type Error[src]

The type of possible errors when sending.

Loading content...

Required methods

fn send_choice<'async_lifetime, const LENGTH: usize>(
    &'async_lifetime mut self,
    choice: Choice<LENGTH>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_lifetime>>
[src]

Send any Choice<N> using the Convention specified by the trait implementation.

Loading content...

Implementors

Loading content...