Crate progress_string [] [src]

This library is primarily concerned with generating strings that can be used by your favorite terminal stream manipulation system to display a progress bar

Example

extern crate termion;
extern crate progress_string
 
fn main() {
    let bar = progress_string::BarBuilder::new()
                                        .total(10000)
                                        .include_percent()
                                        .get_bar();
    println!("starting the progress");
    for i in 0..10000 {
        bar.replace(i);
        print!("{}{}", termion::cursor::Left(bar.get_last_width(), bar.to_string())
        std::thread::sleep(100);
    }
    println!("done with progress");
}

Structs

Bar

Represents a progress bar, this can be used to get your progress string

BarBuilder

Helper struct for building a progress bar