Skip to main content

replace_spinner_frame

Function replace_spinner_frame 

Source
pub fn replace_spinner_frame(text: &str, new_frame: &str) -> Option<String>
Expand description

Replace the spinner frame prefix in a status text. Returns None if the text does not start with a known spinner frame.

Animated statuses MUST start with a character from crate::animation::SPINNER_FRAMES followed by a space, otherwise event_loop::handle_tick cannot rotate the frame and the animation silently stops.