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

Function create_spinner

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

Create a spinner for operations with unknown duration. Spinners are used when we don't know how long an operation will take or how much work remains. They provide visual feedback that something is happening without showing percentage progress. # Arguments `message` - The message to display next to the spinner # Returns A configured [`ProgressBar`] with spinner styling. # Example ```rust,ign

(message: &str)

Source from the content-addressed store, hash-verified

83/// progress::finish_success(&spinner, "Connected!");
84/// ```
85pub fn create_spinner(message: &str) -> ProgressBar {
86 let pb = ProgressBar::new_spinner();
87 pb.set_style(spinner_style());
88 pb.set_message(message.to_string());
89 pb.enable_steady_tick(Duration::from_millis(SPINNER_TICK_MS));
90 pb
91}
92
93/// Create a progress bar for operations with known total.
94///

Callers 14

run_from_viewFunction · 0.85
run_tagFunction · 0.85
run_asyncMethod · 0.85
run_asyncMethod · 0.85
runMethod · 0.85
runMethod · 0.85
run_asyncMethod · 0.85
test_create_spinnerFunction · 0.85
test_finish_successFunction · 0.85
test_finish_errorFunction · 0.85
test_finish_warningFunction · 0.85
test_finish_and_clearFunction · 0.85

Calls 1

spinner_styleFunction · 0.85

Tested by 7

test_create_spinnerFunction · 0.68
test_finish_successFunction · 0.68
test_finish_errorFunction · 0.68
test_finish_warningFunction · 0.68
test_finish_and_clearFunction · 0.68
test_empty_messageFunction · 0.68
test_unicode_messageFunction · 0.68