Expand description
prgrs is a simple progress bar for rust, that aims to work like the python package tqdm.
§Example
use prgrs::{Prgrs, writeln, Length};
use std::{thread, time};
fn main() {
for i in Prgrs::new(0..1000, 1000).set_length_move(Length::Proportional(0.5)){
thread::sleep(time::Duration::from_millis(10));
if i % 10 == 0{
let str = format!("{}", i);
writeln(&str).ok();
}
}
}The output will look something like this:
[############## ] ( 42%)
Structs§
Enums§
- Length
- Use this struct to set the length of the progress bar. The lengths include the percentage count and parentheses at the end of the bar.
Functions§
- writeln
- Use this function to write to the terminal, while displaying a progress bar.