Expand description

Asynchronous streams

This module contains the Stream trait and a number of adaptors for this trait. This trait is very similar to the Iterator trait in the standard library except that it expresses the concept of blocking as well. A stream here is a sequential sequence of values which may take some amount of time in between to produce.

A stream may request that it is blocked between values while the next value is calculated, and provides a way to get notified once the next value is ready as well.

You can find more information/tutorials about streams online at https://tokio.rs

Modules

An unbounded set of futures.

Structs

A stream combinator which chains a computation onto values produced by a stream.

An adaptor for a stream of futures to execute the futures concurrently, if possible, delivering results as they become available.

An adaptor for a stream of futures to execute the futures concurrently, if possible.

Stream for the catch_unwind combinator.

An adapter for chaining the output of two streams.

An adaptor that chunks up elements in a vector.

A future which collects all of the values of a stream into a vector.

ConcatDeprecated

A stream combinator to concatenate the results of a stream into the first yielded item.

A stream combinator to concatenate the results of a stream into the first yielded item.

A stream which contains no elements.

A stream combinator used to filter the results of a stream and only yield some values.

A combinator used to filter the results of a stream and simultaneously map them to a different type.

A combinator used to flatten a stream-of-streams into one long stream of elements.

A future used to collect all the results of a stream into one generic type.

A stream combinator which executes a unit closure over each item on a stream.

Future for the Stream::forward combinator, which sends a stream of values to a sink and then waits until the sink has fully flushed those values.

A stream combinator to change the error type of a stream.

A stream which “fuse“s a stream once it’s terminated.

FutureSenderDeprecated

Future returned by Sender::send.

An unbounded queue of futures.

An unbounded set of futures.

Do something with the items of a stream, passing it on.

Do something with the error of a stream, passing it on.

IterDeprecated

A stream which is just a shim over an underlying instance of Iterator.

A stream which is just a shim over an underlying instance of Iterator.

A stream which is just a shim over an underlying instance of Iterator.

IterStreamDeprecated

A stream which is just a shim over an underlying instance of Iterator.

A stream combinator which will change the type of a stream from one type to another.

A stream combinator which will change the error type of a stream from one type to another.

MergeDeprecated

An adapter for merging the output of two streams.

A stream which emits single element and then EOF.

A stream combinator which chains a computation onto errors produced by a stream.

A Stream that implements a peek method.

A stream which adapts a function returning Poll.

ReceiverDeprecated

The receiving end of a channel which implements the Stream trait.

Stream that produces the same element repeatedly.

Error indicating a SplitSink<S> and SplitStream<S> were not two halves of a Stream + Split, and thus could not be reunited.

An adapter for merging the output of two streams.

SendErrorDeprecated

Error type for sending, used when the receiving end of the channel is dropped

SenderDeprecated

The transmission end of a channel which is used to send values.

A stream combinator which skips a number of elements before continuing.

A stream combinator which skips elements of a stream while a predicate holds.

A Sink part of the split pair

A Stream part of the split pair

A combinator used to temporarily convert a stream into a future.

A stream combinator which returns a maximum number of elements.

A stream combinator which takes elements from a stream while a predicate holds.

A stream combinator which chains a computation onto each item produced by a stream.

A stream which creates futures, polls them and return their result

A stream combinator which converts an asynchronous stream to a blocking iterator.

An adapter for merging the output of two streams.

Enums

MergedItemDeprecated

An item returned from a merge stream, which represents an item from one or both of the underlying streams.

Traits

A stream of values, not all of which may have been produced yet.

Functions

channelDeprecated

Creates an in-memory channel implementation of the Stream trait.

Creates a stream which contains no elements.

Converts a list of futures into a Stream of results from the futures.

Converts a list of futures into a Stream of results from the futures.

iterDeprecated

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

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

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

Creates a stream of single element

Creates a new stream wrapping around a function returning Poll.

Create a stream which produces the same item repeatedly.

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