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
receivefunction 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
sendfunction on a channel. The future gets resolved withNonewhen 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
receivefunction 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
Tbetween 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
Tbetween concurrent tasks. The ends of the Channel are represented through the returnedSenderandReceiver. TheReceivercan be cloned. - Creates a new oneshot channel which can be used to exchange values of type
Tbetween 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
Tbetween 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
GenericOneshotBroadcastReceiverimplementation backed byparking_lot. - A
GenericOneshotBroadcastSenderimplementation backed byparking_lot. - A
GenericOneshotReceiverimplementation backed byparking_lot. - A
GenericOneshotSenderimplementation backed byparking_lot. - A
GenericReceiverimplementation backed byparking_lot. - A
GenericSenderimplementation backed byparking_lot. - A
GenericStateReceiverimplementation backed byparking_lot. - A
GenericStateSenderimplementation backed byparking_lot. - A
GenericReceiverimplementation backed byparking_lot. - A
GenericSenderimplementation backed byparking_lot.