Skip to main content

Module mpsc

Module mpsc 

Source
Expand description

Multi-producer, single-consumer FIFO queue communication primitives.

Structs§

IntoIter
An owning iterator over messages on a Receiver, created by into_iter.
Iter
An iterator over messages on a Receiver, created by iter.
Receiver
The receiving half of Rust’s channel (or sync_channel) type. This half can only be owned by one thread.
RecvError
An error returned from the recv function on a Receiver.
SendError
An error returned from the Sender::send or SyncSender::send function on channels.
Sender
The sending-half of Rust’s asynchronous channel type. This half can only be owned by one thread, but it can be cloned to send to other threads.
SyncSender
The sending-half of Rust’s synchronous sync_channel type.
TryIter
An iterator that attempts to yield all pending values for a Receiver, created by try_iter.

Enums§

RecvTimeoutError
This enumeration is the list of possible errors that made recv_timeout unable to return data when called. This can occur with both a channel and a sync_channel.
TryRecvError
This enumeration is the list of the possible reasons that try_recv could not return data when called. This can occur with both a channel and a sync_channel.
TrySendError
This enumeration is the list of the possible error outcomes for the try_send method.

Functions§

channel
Create an unbounded channel
sync_channel
Create a bounded channel