2 unstable releases

0.2.0 Jun 13, 2021
0.1.0 Apr 29, 2020

#1741 in Asynchronous

Download history 69/week @ 2025-11-08 39/week @ 2025-11-15 34/week @ 2025-11-22 43/week @ 2025-11-29 42/week @ 2025-12-06 37/week @ 2025-12-13 44/week @ 2025-12-20 35/week @ 2025-12-27 32/week @ 2026-01-03 14/week @ 2026-01-10 40/week @ 2026-01-17 30/week @ 2026-01-24 33/week @ 2026-01-31 13/week @ 2026-02-07 27/week @ 2026-02-14 59/week @ 2026-02-21

136 downloads per month
Used in 2 crates

MIT/Apache

14KB
297 lines

Report the progress of an async read operation

As promised on Twitter.

Examples

use futures::{
    io::AsyncReadExt,
    stream::{self, TryStreamExt},
};
use async_read_progress::*;

let src = vec![1u8, 2, 3, 4, 5];
let total_size = src.len();
let reader = stream::iter(vec![Ok(src)]).into_async_read();

let mut reader = reader.report_progress(
    /* only call every */ std::time::Duration::from_millis(20),
    |bytes_read| eprintln!("read {}/{}", bytes_read, total_size),
);
#

Async Read Progress

Context: Rust, async/await, async readers.

Extension traits for inspecting AsyncRead progress.

Supports futures 0.3 and tokio 0.2.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~20–690KB