Create a progress bar for byte-based operations (downloads, transfers). Similar to [`create_progress_bar`] but uses byte-friendly formatting (KB, MB, GB) instead of raw counts. # Arguments `total_bytes` - The total number of bytes to process `message` - The message to display with the progress bar # Returns A configured [`ProgressBar`] with byte-progress styling.
(total_bytes: u64, message: &str)
| 137 | /// |
| 138 | /// A configured [`ProgressBar`] with byte-progress styling. |
| 139 | pub fn create_byte_progress_bar(total_bytes: u64, message: &str) -> ProgressBar { |
| 140 | let pb = ProgressBar::new(total_bytes); |
| 141 | pb.set_style(byte_progress_style()); |
| 142 | pb.set_message(message.to_string()); |
| 143 | pb.enable_steady_tick(Duration::from_millis(PROGRESS_TICK_MS)); |
| 144 | pb |
| 145 | } |
| 146 | |
| 147 | /// Create a hidden (non-visual) progress bar for tracking without display. |
| 148 | /// |