Expand description
A simple progress bar library inspired by Python’s tqdm
.
for _ in tqdm_rs::Tqdm::new(0..10) {
tqdm_rs::write("Doing some work...\nOn multiple lines!");
std::thread::sleep(std::time::Duration::from_millis(100));
continue
}
// It is possible to use print, but it looks more clumsy!
for _ in tqdm_rs::Tqdm::new(0..10) {
println!("Doing some work...\nOn multiple lines!");
std::thread::sleep(std::time::Duration::from_millis(100));
continue
}
let mut tq = tqdm_rs::Tqdm::manual(100);
for _ in 0..10 {
println!("I am updated manually!");
tq.update(10);
}
Structs§
- Tqdm
- Empty struct used for creating one of the two tqdm types.
- Tqdm
Auto - Struct that handles progress automatically.
- Tqdm
Manual - For manually updating the progress.
Functions§
- write
- Properly handles writing text along with the progress bar.
println!
works, but looks a little clumsy if the loop sleeps.