Crate suspend_channel

Crate suspend_channel 

Source
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§

AsyncStream
A Stream implementation wrapping a generator Future.
AsyncStreamScope
A utility class for providing values to the stream.
AsyncStreamSend
A Future which 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.
NextFuture
A Future which resolves to the next item of a Stream.
ReceiveOnce
Created by send_once() and used to receive a single value from an associated SendOnce instance.
Receiver
Created by channel() and used to receive a stream of values from an associated Sender.
SendOnce
Created by send_once() and used to dispatch a single value to an associated ReceiveOnce instance.
Sender
Created by channel() and used to dispatch a stream of values to a an associated Receiver.
TimedOut
An error returned when a timeout has expired.
TrackSend
A Future which resolves once a send has completed.
TryAsyncStreamSend
A Future which resolves when the dispatched value has been received.

Traits§

StreamNext
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 AsyncStream from a generator function.
send_once
Create a channel for sending a single value between a producer and consumer.