[][src]Function prgrs::writeln

pub fn writeln(text: &str) -> Result<(), Error>

Use this function to write to the terminal, while displaying a progress bar.

It may return an error, when the size of the terminal couldn't be determined.

In this case the supplied text will NOT be printed, so you may want to print it with println!() instead.

Example

use prgrs::{Prgrs, writeln};
for i in Prgrs::new(0..100, 100){
    if let Err(_) = writeln("test") {
        println!("test")
    }
}