Inbox

Trait Inbox 

Source
pub trait Inbox<M> {
    // Required method
    async fn next(&mut self) -> M;
}

Required Methods§

Source

async fn next(&mut self) -> M

Retrieve the next message in the inbox. A default value to use as a response must be provided to ensure a response is always given.

This method returns None if the channel is closed.

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<'ch, M, MUT, const QUEUE_SIZE: usize> Inbox<M> for Receiver<'ch, MUT, M, QUEUE_SIZE>
where M: 'ch, MUT: RawMutex,

Source§

async fn next(&mut self) -> M

Implementors§