Trait AsyncSender

Source
pub trait AsyncSender<T> {
    // Required methods
    fn send(&self, item: T) -> impl Future<Output = ()>;
    fn try_send(&self, item: T) -> Result<(), T>;
}

Required Methods§

Source

fn send(&self, item: T) -> impl Future<Output = ()>

Source

fn try_send(&self, item: T) -> Result<(), T>

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<M: RawMutex, T, const N: usize> AsyncSender<T> for Channel<M, T, N>

Source§

fn send(&self, item: T) -> impl Future<Output = ()>

Source§

fn try_send(&self, item: T) -> Result<(), T>

Source§

impl<M: RawMutex, T: Clone, const CAP: usize, const SUBS: usize, const PUBS: usize> AsyncSender<T> for PubSubChannel<M, T, CAP, SUBS, PUBS>

Source§

async fn send(&self, item: T)

Source§

fn try_send(&self, item: T) -> Result<(), T>

Implementors§