[][src]Module futures_async_combinators::stream

Traits

Stream

A stream of values produced asynchronously.

Functions

chain

Adapter for chaining two stream.

collect

Collect all of the values of this stream into a vector, returning a future representing the result of that computation.

concat

Concatenate all items of a stream into a single extendable destination, returning a future representing the end result.

filter

Filters the values produced by this stream according to the provided asynchronous predicate.

filter_map

Filters the values produced by this stream while simultaneously mapping them to a different type according to the provided asynchronous closure.

flatten

Flattens a stream of streams into just one continuous stream.

fold

Execute an accumulating asynchronous computation over a stream, collecting all the values into one final result.

for_each

Runs this stream to completion, executing the provided asynchronous closure for each element on the stream.

into_future

Converts this stream into a future of (next_item, tail_of_stream). If the stream terminates, then the next item is None.

iter

Converts an Iterator into a Stream which is always ready to yield the next value.

map

Maps this stream's items to a different type, returning a new stream of the resulting type.

next

Creates a future that resolves to the next item in the stream.

poll_fn

Creates a new stream wrapping a function returning Poll<Option<T>>.

repeat

Create a stream which produces the same item repeatedly.

skip

Creates a new stream which skips n items of the underlying stream.

skip_while

Skip elements on this stream while the provided asynchronous predicate resolves to true.

take

Creates a new stream of at most n items of the underlying stream.

take_while

Take elements from this stream while the provided asynchronous predicate resolves to true.

then

Computes from this stream's items new items of a different type using an asynchronous closure.

unfold

Creates a Stream from a seed and a closure returning a Future.

zip

An adapter for zipping two streams together.