pub struct Channel<T> { /* private fields */ }
Expand description

An asynchronous multi-producer multi-consumer channel based on tokio::sync::Notify.

Implementations§

Create a new instance of Channel.

Close the channel.

Send a message to the channel.

The message object will be returned on error, to ease the lifecycle management.

Try to receive a message from the channel.

Receive message from the channel in asynchronous mode.

Flush all pending requests specified by the predicator.

Lock the channel to block all queue operations.

Notify all waiters.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.