prog-rs

licence

A Rust library to help easily build a progress bar.

animated screenshot

Usage

First, add the following to your Cargo.toml:

toml [dependencies] prog_rs = "0.1"

Next, add this to your crate root:

rust extern crate prog_rs;

To add a progress bar while iterating, just add .progress() behind your iterator:

```rust use prog_rs::prelude::*;

fn main() { for _ in (0..1000).progress() { std::thread::sleep(std::time::Duration::frommillis(5)); } } ```

Some parameters can be tweaked using with_ prefixed methods:

```rust use prog_rs::prelude::*;

fn main() { for _ in (0..1000) .progress() .withprefix("Processing...") .withoutputstream(progrs::OutputStream::StdErr) .withbarposition(progrs::BarPosition::Right) { do_something(); } } ```