spinoff/examples/all_spinners.rs
2022-07-16 17:33:16 -06:00

13 lines
369 B
Rust

use spinoff::{Spinner, Spinners};
use std::{thread::sleep, time::Duration};
use strum::IntoEnumIterator;
fn main() {
let mut spin = Spinner::new(Spinners::Dots, "", None);
for spinner in Spinners::iter() {
spin.update(spinner, format!("Spinners::{}", spinner), None);
sleep(Duration::from_secs(2));
}
spin.stop_with_message("Done!");
}