loaders 0.0.0

A fully-featured, customisable progress bar and loading indicator library for Rust CLI and terminal applications
Documentation
use loaders::Spinner;
use loaders::spinner::frames::{CLOCK, DOTS, MOON};
use std::thread;
use std::time::Duration;

fn run_spinner(frames: &'static [&'static str], label: &str) {
    let spinner = Spinner::with_message(frames, format!("{label}: preparing"));
    spinner.start();
    thread::sleep(Duration::from_secs(1));
    spinner.set_message(format!("{label}: halfway"));
    thread::sleep(Duration::from_secs(1));
    spinner.set_message(format!("{label}: finalising"));
    thread::sleep(Duration::from_secs(1));
    spinner.stop_with_symbol("", "Completed!");
}

fn main() {
    run_spinner(&DOTS, "dots");
    run_spinner(&MOON, "moon");
    run_spinner(&CLOCK, "clock");
}