Crate stream_utils

Source
Expand description

Extra Stream adaptors and functions.

To Extend Stream with methods in this crate, import the StreamUtils trait:

use stream_utils::StreamUtils;

Now, new methods like copied_multi_stream are available on all streams.

use futures_util::stream; // or futures::stream;
use stream_utils::StreamUtils;

let stream = stream::iter(0..3);
let streams = stream.copied_multi_stream(4);

Structs§

CopiedMultiStream
Stream for the copied_multi_stream method.

Traits§

StreamUtils
A Stream blanket implementation trait that provides extra adaptors.

Functions§

copied_multi_stream
Copies values from the inner stream into multiple new streams. Polls from inner stream one value and waits till all new streams have pulled a copied value. Note that not pulling from all new streams will result in a blocking state.