Crates.io | howudoin |
lib.rs | howudoin |
version | 0.1.2 |
source | src |
created_at | 2023-01-10 05:48:42.539486 |
updated_at | 2023-03-01 22:36:25.566404 |
description | Progress reporting abstraction |
homepage | |
repository | https://github.com/kdr-aus/how-u-doin |
max_upload_size | |
id | 755036 |
size | 61,741 |
Progress reporting abstraction for Rust
howudoin
intends to make producing and consuming progress reports simple and ergonomic.
Importantly, it separates the progress producers from the consumer, allowing progress reports
to be generated from disparate sections in a system.
// initialise a consumer loop
howudoin::init(howudoin::consumers::Noop::default());
let rpt = howudoin::new().label("Progress").set_len(10);
for _ in 0..10 {
rpt.inc(); // increment the progress
// check for cancellation
if rpt.cancelled() {
break;
}
}
rpt.finish(); // finalise progress
// fetch the tree of progress
let progress = howudoin::fetch();
Features:
Take a look at the examples for example consumers.
Please help support this project by sponsoring 💗