2 unstable releases

0.2.0 Jul 28, 2023
0.1.0 Jul 26, 2023

#1048 in Asynchronous

Download history 65/week @ 2024-03-08 42/week @ 2024-03-15 133/week @ 2024-03-22 73/week @ 2024-03-29 76/week @ 2024-04-05 158/week @ 2024-04-12 126/week @ 2024-04-19 85/week @ 2024-04-26 65/week @ 2024-05-03 72/week @ 2024-05-10 129/week @ 2024-05-17 145/week @ 2024-05-24 87/week @ 2024-05-31 46/week @ 2024-06-07

162 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