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]
fn new() -> Text
Create a new progress text.
fn set_job_title(&mut self, new_title: &str)
Set text shown in progress text.
fn jobs_done(&self)
Tell progress::Text everything has been done. Also prints "\n".