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§
- Channel
Receive Future - 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
. - Channel
Send Future - 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. - Generic
Oneshot Broadcast Receiver - The receiving side of a channel which can be used to exchange values between concurrent tasks.
- Generic
Oneshot Broadcast Sender - The sending side of a channel which can be used to exchange values between concurrent tasks.
- Generic
Oneshot Receiver - The receiving side of a channel which can be used to exchange values between concurrent tasks.
- Generic
Oneshot Sender - The sending side of a channel which can be used to exchange values between concurrent tasks.
- Generic
Receiver - The receiving side of a channel which can be used to exchange values between concurrent tasks.
- Generic
Sender - The sending side of a channel which can be used to exchange values between concurrent tasks.
- Generic
State Receiver - The receiving side of a channel which can be used to exchange values between concurrent tasks.
- Generic
State Sender - The sending side of a channel which can be used to exchange values between concurrent tasks.
- Shared
Stream - A stream that receives from channel using a
GenericReceiver
. - State
Receive Future - 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§
- channel
- Creates a new channel with the given buffering capacity
- generic_
channel - 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. - generic_
oneshot_ broadcast_ 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. - generic_
oneshot_ channel - 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. - generic_
state_ broadcast_ channel - 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. - oneshot_
broadcast_ channel - Creates a new oneshot broadcast channel.
- oneshot_
channel - Creates a new oneshot channel.
- state_
broadcast_ channel - Creates a new state broadcast channel.
- unbuffered_
channel - Creates a new unbuffered channel.
Type Aliases§
- Oneshot
Broadcast Receiver - A
GenericOneshotBroadcastReceiver
implementation backed byparking_lot
. - Oneshot
Broadcast Sender - A
GenericOneshotBroadcastSender
implementation backed byparking_lot
. - Oneshot
Receiver - A
GenericOneshotReceiver
implementation backed byparking_lot
. - Oneshot
Sender - A
GenericOneshotSender
implementation backed byparking_lot
. - Receiver
- A
GenericReceiver
implementation backed byparking_lot
. - Sender
- A
GenericSender
implementation backed byparking_lot
. - State
Receiver - A
GenericStateReceiver
implementation backed byparking_lot
. - State
Sender - A
GenericStateSender
implementation backed byparking_lot
. - Unbuffered
Receiver - A
GenericReceiver
implementation backed byparking_lot
. - Unbuffered
Sender - A
GenericSender
implementation backed byparking_lot
.