progressing

Build Status nightly

Tag Crates.io Docs

Changelog Last commit

License

Look and feel

NOTE: The examples below use set(...), but add(...) is supported as well.

```rust // Printing value 0.3 clamped to [0, 1] // [=====>------------] let mut progressbar = progressing::ClampingBar::new(); progressbar.setlen(20); progressbar.set(0.3); println!("{}", progress_bar);

// Mapping from [-9, 5] to [0, 1] // [================>-] (4 / 5) let mut progressbar = progressing::MappingBar::new(-9, 5); progressbar.setlen(20); progressbar.set(4); println!("{}", progress_bar);

/// Mapping from [-9, 5] to [0, 1], but with time-approximation /// [================>-] (4 / 5) ~ 2 min println!("Mapping from [-9, 5] to [0, 1], but with time-approximation"); let progressbar = progressing::MappingBar::new(-9..=5); let mut progressbar = progressing::TimedBar::new(progressbar); progressbar.setlen(20); progressbar.set(4); println!("{}", progress_bar);

// Bernoulli-Bar counting successes (42 / 60) and attempts (# 130) // [============>-----] (42 / 60 # 130) let mut progressbar = progressing::BernoulliBar::fromgoal(60); progressbar.setlen(20); progressbar.set((42, 130)); println!("{}", progressbar);

// clamped-example, but with other styles let mut progressbar = progressing::ClampingBar::new(); progressbar.setlen(20); progressbar.set(0.3);

// different custom styles possible progressbar.setstyle("(->.)"); println!("{}", progressbar); progressbar.setstyle("[# ]"); println!("{}", progressbar); progressbar.setstyle("(#--)"); println!("{}", progress_bar); ```

Setup and usage

Please refer to the examples.