logbar
A log-friendly command-line progress bar.
Many progress bar implementations update the progress report in place, by going back and overwriting previous output. This allows for beautiful progress displays, but becomes a problem when moving backwards is not possible, for example when writing to a pipe. This crate's progress bar never tries to modify what was printed before, so the output can be piped directly to a log file.
Usage
Add this to your Cargo.toml:
[]
= "0.1"
Examples
This example creates a default progress bar for a ten-step process:
let bar = new;
// first step (10%) done
bar.inc;
// next three steps done
bar.inc;
// everything done
bar.finish;
We can also customise the style of the progress bar:
let style = default
.width // 80 characters wide
.labels // no XX% labels
.tick.bar // rendered as ↓---↓---↓ etc.
.indicator // indicating the progress with '█' characters
;
let bar = with_style;
bar.finish;
License: GPL-3.0-or-later