cli_progress_bar

Function cli_progress_bar 

Source
pub fn cli_progress_bar(message: &str, total: usize) -> CliProgressBar
Expand description

Creates and displays a new progress bar.

Initializes a progress bar with the specified message and total value, and immediately renders it at 0% completion.

§Arguments

  • message - The message to display alongside the progress bar
  • total - The total value representing 100% completion

§Returns

Returns a CliProgressBar instance that can be updated with increment() or set().

§Example

use falcon_cli::cli_progress_bar;

let mut bar = cli_progress_bar("Processing files", 100);
for i in 0..100 {
    // Do work...
    bar.increment(1);
}
bar.finish();