Module indicatif
Progress bars and spinners for CLI applications.
- Crate
::indicatif. - docs.rs
- crates.io
- GitHub
indicatif provides progress bars, spinners, and other progress indicators
for command-line applications.
It handles terminal width, colors, and smooth updates.
The main types are ProgressBar for single progress indicators
and MultiProgress for displaying multiple progress bars simultaneously.
Use ProgressStyle to customize the appearance.
Examples
Simple progress bar:
use ProgressBar;
let pb = new;
for i in 0..100
pb.finish_with_message;
Styled progress bar:
use ;
let pb = new;
pb.set_style;
for _ in 0..1000
pb.finish;
Spinner for indeterminate progress:
use ProgressBar;
use Duration;
let spinner = new_spinner;
spinner.set_message;
spinner.enable_steady_tick;
// Do work...
spinner.finish_with_message;