Trait Sender

Source
pub trait Sender {
    type Error;

    // Required method
    fn send(
        &mut self,
        item: EncodedItem,
    ) -> impl Future<Output = Result<(), Self::Error>> + '_;
}
Expand description

Abstract sender trait for sending encoded items

Required Associated Types§

Source

type Error

Error type

Required Methods§

Source

fn send( &mut self, item: EncodedItem, ) -> impl Future<Output = Result<(), Self::Error>> + '_

Send an item

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Sender for Sender<EncodedItem>

Source§

type Error = SendError<EncodedItem>

Source§

fn send( &mut self, item: EncodedItem, ) -> impl Future<Output = Result<(), Self::Error>> + '_

Implementors§