Function console_utils::input::spinner
source · pub fn spinner(time: f64, spinner_type: SpinnerType)Expand description
Displays a console-based spinner animation.
A spinner is a visual indicator of a long-running process. It consists of a set of frames that are displayed sequentially to create the appearance of motion.
Parameters
time: A floating-point number representing the duration of the spinner animation in seconds.spinner_type: The type of spinner to display.
Example
use console_utils::input::{spinner, SpinnerType};
// Display a standard spinner for 3 seconds
spinner(3.0, SpinnerType::Standard);
// Display a custom spinner for 2 seconds
spinner(2.0, SpinnerType::Custom(vec!["1", "2", "3", "4", "3", "2"]));