loadingbar

Crates.ioloadingbar
lib.rsloadingbar
version1.0.1
sourcesrc
created_at2023-01-15 14:18:43.493936
updated_at2023-01-15 14:38:36.868994
descriptionA simple loading bar for the terminal
homepage
repositoryhttps://github.com/basicallygit/loadingbar
max_upload_size
id759497
size6,456
(basicallygit)

documentation

README

loadingbar

A simple, customizable loading bar for the terminal written in rust

Usage

Default loading bar

use loadingbar::LoadingBar;

fn main() {
    let bar = LoadingBar::new();
    bar.start();
}

Custom loading bar

use loadingbar::LoadingBar;

fn main() {
    let bar = LoadingBar::new_with_config(
        std::time::Duration::from_secs(10), // how long the bar will take to complete
        '*', // the character to use for the progress bar
        30, // the length of the bar in characters
        String::from("Loading.. "), // prefix message (Loading.. [##########      ])
    );
    bar.start();
}
Commit count: 5

cargo fmt