Module channel

Source
Expand description

Channels

Multi-producer, multi-consumer queues, used for message-based communication. Can provide a lightweight inter-task synchronisation mechanism, at the cost of some extra memory.

Structs§

Receiver
The receiving side of a channel.
Recv
A future returned by Receiver::recv().
RecvError
An error returned from Receiver::recv().
Send
A future returned by Sender::send().
SendError
An error returned from Sender::send().
Sender
The sending side of a channel.
WeakReceiver
A Receiver that prevents the channel from not being closed.
WeakSender
A Sender that prevents the channel from not being closed.

Enums§

TryRecvError
An error returned from Receiver::try_recv().
TrySendError
An error returned from Sender::try_send().

Functions§

bounded
Creates a bounded channel.
unbounded
Creates an unbounded channel.