rustbar 0.2.0

Set of progressbars for rust
Documentation
  • Coverage
  • 5.56%
    1 out of 18 items documented0 out of 16 items with examples
  • Size
  • Source code size: 6.32 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.04 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • Fiedzia/rustbar
    2 1 5
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Fiedzia

rustbar

Set of progressbars for rust

extern crate rustbar;

use std::thread::sleep_ms;

use rustbar::rustbars::ProgressBar;

pub fn main(){

    let mut pbar = rustbar::rustbars::PercentageProgressBar::new();
    println!("\nPercentageProgressBar demo");
    for idx in 0..101 {
        pbar.set_value(idx);
        pbar.set_msg("Calculating...");
        pbar.render().unwrap();
        sleep_ms(50);
    }

    println!("\nInifiniteProgressBar demo");
    let mut infbar  = rustbar::rustbars::InfiniteProgressBar::new().to_stderr();
    for _ in 0..101 {
        infbar.set_msg("Thinking...");
        infbar.render().unwrap();
        sleep_ms(50);
    }

}

See src/bin/demo.rs for usage example.

Alt text