spinoff/examples/all_spinners.rs

13 lines
349 B
Rust
Raw Normal View History

2022-07-15 12:59:22 -05:00
use spinoff::Spinners;
use std::thread::sleep;
use std::time::Duration;
use strum::IntoEnumIterator;
fn main() {
2022-07-16 09:15:01 -05:00
let mut spin = spinoff::new(Spinners::Dots, "Spinning...", None);
2022-07-15 12:59:22 -05:00
for spinner in Spinners::iter() {
2022-07-16 09:15:01 -05:00
spin = spin.update(spinner, "Spinning...", None);
2022-07-15 12:59:22 -05:00
sleep(Duration::from_secs(1));
}
println!("Done!");
}