Crate futures_state_stream

Crate futures_state_stream 

Source
Expand description

A version of the futures crate’s Stream which returns a state value when it completes.

This is useful in contexts where a value “becomes” a stream for a period of time, but then switches back to its original type.

Structs§

Collect
A future which collects the items of a stream.
Filter
A stream which applies a filter to the items of a stream.
FilterMap
A stream which applies a filter and transform to items of a stream.
FlattenStateStream
A stream which evaluates a future and then then stream returned by it.
ForEach
A future which applies a closure to each item of a stream.
FromStream
A StateStream yielding elements of a normal `Stream.
IntoFuture
A future yielding the next element of a stream.
IntoStream
A Stream yielding the elements of a StateStream and discarding its state.
Map
A stream which applies a transform to the elements of a stream.
MapErr
A stream which applies a transform to the errors of a stream.
MapState
A stream which applies a transform to the state of a stream.
Unfold
A stream which iteratively applies a closure to state to produce items.

Enums§

StreamEvent
An event from a StateStream.

Traits§

FutureExt
An extension trait adding functionality to Future.
StateStream
A variant of futures::Stream which returns a state value when it completes.
StreamExt
An extension trait adding functionality to Stream.

Functions§

unfold
Returns a stream produced by iteratively applying a closure to a state.