Struct progress::Text [] [src]

pub struct Text { /* fields omitted */ }

Struct that used for presenting progress with plain texts.

It looks like:

Doing something

Examples

use std::thread;

extern crate progress;

fn main() {
    let mut text = progress::Text::new();

    text.set_job_title("Drawing...");
    thread::sleep_ms(1000);

    text.set_job_title("Painting...");
    thread::sleep_ms(1000);

    text.set_job_title("Sleeping zzz");
    thread::sleep_ms(1000);

    text.set_job_title("Wait! Is that a nyan cat?");
    thread::sleep_ms(1000);

    text.set_job_title("This must be my dream zzzzzz");
    thread::sleep_ms(1000);

    text.jobs_done();
}

Methods

impl Text
[src]

Create a new progress text.

Set text shown in progress text.

Tell progress::Text everything has been done. Also prints "\n".