Expand description
Channel implementations where Sender and Receiver sides are cloneable and owned. The Futures produced by channels in this module don’t require a lifetime parameter.
Structs§
- A Future that is returned by the
receive
function on a channel. The future gets resolved withSome(value)
when a value could be received from the channel. If the channels gets closed and no items are still enqueued inside the channel, the future will resolve toNone
. - A Future that is returned by the
send
function on a channel. The future gets resolved withNone
when a value could be written to the channel. If the channel gets closed the send operation will fail, and the Future will resolve toChannelSendError(T)
and return the item to send. - The receiving side of a channel which can be used to exchange values between concurrent tasks.
- The sending side of a channel which can be used to exchange values between concurrent tasks.
- The receiving side of a channel which can be used to exchange values between concurrent tasks.
- The sending side of a channel which can be used to exchange values between concurrent tasks.
- The receiving side of a channel which can be used to exchange values between concurrent tasks.
- The sending side of a channel which can be used to exchange values between concurrent tasks.
- The receiving side of a channel which can be used to exchange values between concurrent tasks.
- The sending side of a channel which can be used to exchange values between concurrent tasks.
- A stream that receives from channel using a
GenericReceiver
. - A Future that is returned by the
receive
function on a state broadcast channel. The future gets resolved withSome((state_id, state))
when a value could be received from the channel.
Functions§
- Creates a new channel with the given buffering capacity
- Creates a new Channel which can be used to exchange values of type
T
between concurrent tasks. The ends of the Channel are represented through the returned Sender and Receiver. Both the Sender and Receiver can be cloned in order to let more tasks interact with the Channel. - Creates a new oneshot broadcast channel which can be used to exchange values of type
T
between concurrent tasks. The ends of the Channel are represented through the returnedSender
andReceiver
. TheReceiver
can be cloned. - Creates a new oneshot channel which can be used to exchange values of type
T
between concurrent tasks. The ends of the Channel are represented through the returned Sender and Receiver. - Creates a new state broadcast channel which can be used to exchange values of type
T
between concurrent tasks. The ends of the Channel are represented through the returned Sender and Receiver. - Creates a new oneshot broadcast channel.
- Creates a new oneshot channel.
- Creates a new state broadcast channel.
- Creates a new unbuffered channel.
Type Aliases§
- A
GenericOneshotBroadcastReceiver
implementation backed byparking_lot
. - A
GenericOneshotBroadcastSender
implementation backed byparking_lot
. - A
GenericOneshotReceiver
implementation backed byparking_lot
. - A
GenericOneshotSender
implementation backed byparking_lot
. - A
GenericReceiver
implementation backed byparking_lot
. - A
GenericSender
implementation backed byparking_lot
. - A
GenericStateReceiver
implementation backed byparking_lot
. - A
GenericStateSender
implementation backed byparking_lot
. - A
GenericReceiver
implementation backed byparking_lot
. - A
GenericSender
implementation backed byparking_lot
.