Struct progress::Bar [] [src]

pub struct Bar { /* fields omitted */ }

Struct that used for presenting progress bar with plain texts.

It looks like:

Doing something            [===-------] 70%

Examples

use std::thread;

extern crate progress;

fn main() {
    let bar = progress::Bar::new();

    bar.set_job_title("Working...");

    for i in 0..11 {
        thread::sleep_ms(100);
        bar.reach_percent(i * 10);
    }
}

Methods

impl Bar
[src]

Create a new progress bar.

Reset progress percentage to zero and job title to empty string. Also prints "\n".

Set text shown in progress bar.

Put progress to given percentage.

Increase progress with given percentage.