#stream #extension #utilities #async #iter

stream-utils

Additional stream combinators

2 unstable releases

0.2.0 Jul 28, 2023
0.1.0 Jul 26, 2023

#930 in Asynchronous

Download history 36/week @ 2024-01-06 38/week @ 2024-01-13 81/week @ 2024-01-20 68/week @ 2024-01-27 90/week @ 2024-02-03 74/week @ 2024-02-10 152/week @ 2024-02-17 162/week @ 2024-02-24 71/week @ 2024-03-02 67/week @ 2024-03-09 38/week @ 2024-03-16 128/week @ 2024-03-23 97/week @ 2024-03-30 91/week @ 2024-04-06 156/week @ 2024-04-13 89/week @ 2024-04-20

433 downloads per month

MIT/Apache

11KB
185 lines

Stream-Utils

build_status crates.io unsafe forbidden

Additional stream adaptors.

Please read the API documentation here.

Install

Run the following Cargo command in your project directory:

cargo add stream-utils

Or add the following line to your Cargo.toml:

stream-utils = "0.1.0"

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.


lib.rs:

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);

Dependencies

~715KB
~14K SLoC