async-copy-progress =================== [github](https://github.com/mkroening/async-copy-progress) [crates.io](https://crates.io/crates/async-copy-progress) [docs.rs](https://docs.rs/async-copy-progress) [build status](https://github.com/mkroening/async-copy-progress/actions?query=branch%3Amain) Asynchronous copies with progress updates. This library provides an asynchronous copy function which calls a function with the current progress after each step. ```toml [dependencies] async-copy-progress = "1.0" ```
## Example ```rust let mut reader: &[u8] = b"hello"; let mut writer: Vec = vec![]; let progress = AtomicU64::new(0); let report_progress = |amt| progress.store(amt, Ordering::Relaxed); async_copy_progress::copy(&mut reader, &mut writer, report_progress).await?; assert_eq!(&b"hello"[..], &writer[..]); assert_eq!(5, progress.load(Ordering::Relaxed)); ```
#### License Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.