html5_picture/
utils.rs

1use indicatif::ProgressBar;
2
3pub mod imageops;
4mod resized_image_details;
5
6pub use resized_image_details::ResizedImageDetails;
7
8/// Creates a spinner that can be used to indicate progress.
9pub fn create_spinner() -> ProgressBar {
10    let pb = ProgressBar::new_spinner();
11    /*
12    pb.set_style(
13        ProgressStyle::with_template("[{prefix}] {spinner} {wide_msg}")
14            .unwrap(),
15    );
16    */
17    pb
18}
19
20/// Creates a progress bar that can be used to indicate progress.
21pub fn create_progressbar(len: u64) -> ProgressBar {
22    let pb = ProgressBar::new(len);
23    /*
24    pb.set_style(
25        ProgressStyle::with_template(
26            "[{prefix}] {msg} {wide_bar: .cyan/blue} {pos:0}/{len}",
27        )
28        .unwrap(),
29    );
30    */
31    pb
32}