loaders 0.0.0

A fully-featured, customisable progress bar and loading indicator library for Rust CLI and terminal applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use loaders::{ProgressBar, Theme};
use std::thread;
use std::time::Duration;

fn main() {
    for theme in Theme::all() {
        println!("theme: {}", theme.name());
        let pb = ProgressBar::new(100);
        pb.set_style(theme.style());
        pb.set_message(theme.name());
        for _ in 0..100 {
            pb.inc(1);
            thread::sleep(Duration::from_millis(5));
        }
        pb.finish_with_message("done");
    }
}