Expand description
Channel and stream primitives.
Macros§
- stream
- A macro for constructing an async stream from a generator function.
- try_
stream - A macro for constructing an async stream of
Result<T, E>from a generator function.
Structs§
- Async
Stream - A
Streamimplementation wrapping a generatorFuture. - Async
Stream Scope - A utility class for providing values to the stream.
- Async
Stream Send - A
Futurewhich resolves when the dispatched value has been received. - Incomplete
- An error indicating that a receive operation could not be completed because the sender was dropped.
- Next
Future - A
Futurewhich resolves to the next item of aStream. - Receive
Once - Created by
send_once()and used to receive a single value from an associatedSendOnceinstance. - Receiver
- Created by
channel()and used to receive a stream of values from an associatedSender. - Send
Once - Created by
send_once()and used to dispatch a single value to an associatedReceiveOnceinstance. - Sender
- Created by
channel()and used to dispatch a stream of values to a an associatedReceiver. - Timed
Out - An error returned when a timeout has expired.
- Track
Send - A
Futurewhich resolves once a send has completed. - TryAsync
Stream Send - A
Futurewhich resolves when the dispatched value has been received.
Traits§
- Stream
Next - Provide a utility method to await the next item from a stream.
Functions§
- channel
- Create a channel for sending multiple values between a producer and consumer, with synchronization between each consecutive result.
- make_
stream - Construct a new
AsyncStreamfrom a generator function. - send_
once - Create a channel for sending a single value between a producer and consumer.