Create a progress bar for operations with known total. Use this when you know ahead of time how many items will be processed or how many bytes will be transferred. # Arguments `total` - The total number of units to process `message` - The message to display with the progress bar # Returns A configured [`ProgressBar`] with progress styling. # Example ```rust,ignore let files = vec!["a.rs", "
(total: u64, message: &str)
| 116 | /// progress::finish_success(&bar, "All files processed"); |
| 117 | /// ``` |
| 118 | pub fn create_progress_bar(total: u64, message: &str) -> ProgressBar { |
| 119 | let pb = ProgressBar::new(total); |
| 120 | pb.set_style(progress_style()); |
| 121 | pb.set_message(message.to_string()); |
| 122 | pb.enable_steady_tick(Duration::from_millis(PROGRESS_TICK_MS)); |
| 123 | pb |
| 124 | } |
| 125 | |
| 126 | /// Create a progress bar for byte-based operations (downloads, transfers). |
| 127 | /// |