Crate futures_state_stream [] [src]

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

AndThen

A stream which applies a transform to items of a stream.

AndThenState

A stream which applies a transform to the state of a stream.

Buffered

A stream which buffers items of a stream.

BufferedUnordered

A stream which buffers items of a stream, returning them as they become ready.

CatchUnwind

A stream which catches panics generated by a stream.

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 futures and then then stream returned by it.

Fold

A future which applies closures over each item of a stream and its state.

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.

OrElse

A stream which applies a transform to errors of a stream.

SkipWhile

A stream which skips initial items of a stream matching a predicate.

Then

A stream which applies a transform to results 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.

Type Definitions

BoxStateStream

A typedef for a type-erased StateStream trait object.