spinoff/examples/all_spinners.rs
2022-07-18 10:46:33 +02:00

13 lines
359 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!("{}", spinner), None);
sleep(Duration::from_secs(2));
}
spin.stop_with_message("Done!");
}