MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / create_byte_progress_bar

Function create_byte_progress_bar

atomic-cli/src/output/progress.rs:139–145  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

137///
138/// A configured [`ProgressBar`] with byte-progress styling.
139pub 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///

Callers 1

Calls 1

byte_progress_styleFunction · 0.85

Tested by 1