Skip to content

basicallygit/loadingbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

loadingbar

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

Usage

Add the following to your Cargo.toml:

[dependencies]
loadingbar = "1.0.1"

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();
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages