rBar

This is just a simple loading bar that scales to the size of your terminal and has the ability to print a message

Details

At this current version, there is a single function: draw_bar

Arguments: percentage, message, messagebefore, filled, unfilled, ending * Percentage is a 32 bit float(f32) (Usually 0-100) * Message is a string(str) that can be any length * Messagebefore is a boolean(bool) that determines if you want the message while loading to be before or after the bar text * Filled is a char that determines what the bar looks like when filled * Unfilled a char that determines what the bar looks like when not filled * Ending is what the character looks like at the tip

To use

Do all the stuff you normally would to add a package to cargo. The current version is 1.1.0

Example:

use rbar::draw_bar;
use std::{thread, time};

// this example makes a loading bar similar to the one used by cargo fn main() { for i in 0..101 { drawbar(i as f32, "Loading...", false, '=', '-', '>'); thread::sleep(time::Duration::frommillis(100)); } }