Expand description
async_std::channel
re-exports and shims
Structs§
- Channel
Channel
struct that combinesasync_std::channel::Sender
andasync_std::channel::Receiver
into a single struct withsender
andreceiver
members representing a single channel.- Channel
Iterator - Duplex
Channel DuplexChannel
contains 2 channelsrequest
andresponse
meant to provide for a request/response pattern. This is useful for any type of signaling, but especially during task termination, where you can request a task to terminate and wait for a response confirming its termination.- Multiplexer
- A simple MPMC (one to many) channel Multiplexer that broadcasts to
multiple registered receivers.
Multiplexer<T>
itself can be cloned and used to broadcast usingMultiplexer::broadcast()
orMultiplexer::try_broadcast()
. To create a receiving channel, you can callMultiplexerChannel<T>::from()
and supply the desired Multiplexer instance, or simply callMultiplexer::channel()
to create a newMultiplexerChannel
instance. The receiving channel gets unregistered whenMultiplexerChannel
is dropped or the underlyingReceiver
is closed. - Multiplexer
Channel - Receiving channel endpoint for the
Multiplexer
.MultiplexerChannel<T>
holds aSender
and theReceiver
channel endpoints. TheSender
is provided for convenience, allowing internal relay within this channel instance. To process events, simply iterate overMultiplexerChannel::recv()
by callingchannel.recv().await
. - Receiver
- The receiving side of a channel.
- Recv
Error - An error returned from
Receiver::recv()
. - Send
Error - An error returned from
Sender::send()
. - Sender
- The sending side of a channel.
Enums§
- Channel
Error - TryRecv
Error - An error returned from
Receiver::try_recv()
. - TrySend
Error - An error returned from
Sender::try_send()
.