Expand description
Asynchronous channels.
This module provides various channels that can be used to communicate between asynchronous tasks.
Modules§
- 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
. - The error which is returned when sending a value into a channel fails.
- 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. - A stream that receives from a
GenericChannel
. - A channel which can be used to exchange values of type
T
between concurrent tasks. - A channel which can be used to exchange a single value between two or more concurrent tasks.
- A channel which can be used to exchange a single value between two concurrent tasks.
- A channel which can be used to synchronize the state between a sender an arbitrary number of receivers.
- An ID, which allows to differentiate states received from a Channel. Elements with a bigger state ID (
id > otherId
) have been published more recently into the Channel. - 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.
Enums§
- Conveys additional information regarding the status of a channel following a
close
operation. - The error which is returned when trying to receive from a channel without waiting fails.
- The error which is returned when trying to send on a channel without waiting fails.
Type Aliases§
- A
GenericChannel
implementation backed byparking_lot
. - A
GenericChannel
implementation which is not thread-safe. - A
GenericOneshotBroadcastChannel
which is not thread-safe. - A
GenericOneshotChannel
which is not thread-safe. - A
GenericStateBroadcastChannel
which is not thread-safe. - An unbuffered
GenericChannel
implementation which is not thread-safe. - A
GenericOneshotBroadcastChannel
implementation backed byparking_lot
. - A
GenericOneshotChannel
implementation backed byparking_lot
. - A
GenericStateBroadcastChannel
implementation backed byparking_lot
. - An unbuffered
GenericChannel
implementation backed byparking_lot
.