Add a progress bar to a multi-progress container. # Arguments `mp` - The multi-progress container `total` - The total number of units `message` - The progress bar message
(mp: &MultiProgress, total: u64, message: &str)
| 195 | /// * `total` - The total number of units |
| 196 | /// * `message` - The progress bar message |
| 197 | pub fn add_progress_bar(mp: &MultiProgress, total: u64, message: &str) -> ProgressBar { |
| 198 | let pb = mp.add(ProgressBar::new(total)); |
| 199 | pb.set_style(progress_style()); |
| 200 | pb.set_message(message.to_string()); |
| 201 | pb.enable_steady_tick(Duration::from_millis(PROGRESS_TICK_MS)); |
| 202 | pb |
| 203 | } |
| 204 | |
| 205 | /// Suspend multi-progress rendering to run a closure. |
| 206 | /// |