zap-rs 0.3.1

Rust-based AppImage package manager inspired by Zap
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use indicatif::{ProgressBar, ProgressStyle};

use crate::Result;

pub fn make_progress_bar(size: u64) -> Result<ProgressBar> {
    let bar = ProgressBar::new(size);
    bar.set_style(
        ProgressStyle::with_template(
            "{elapsed_precise:.white.dim} {wide_bar:.cyan} {bytes}/{total_bytes} ({bytes_per_sec}, {eta})",
        )?
        .progress_chars("█▉▊▋▌▍▎▏  "),
    );

    Ok(bar)
}