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

Function add_progress_bar

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

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)

Source from the content-addressed store, hash-verified

195/// * `total` - The total number of units
196/// * `message` - The progress bar message
197pub 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///

Callers 2

Calls 2

progress_styleFunction · 0.85
addMethod · 0.45

Tested by 2