spinoff
is a simple to use library for displaying spinners in the terminal, with plenty of features and options.
```rust use spinoff::Spinners; use std::thread::sleep; use std::time::Duration;
let spinner = spinoff::new(Spinners::Dots, "Loading...", "blue".into()); // Can also be Some("blue") or None sleep(Duration::from_secs(3)); spinner.success("Done!"); ```
```rust use spinoff::Spinners; use std::thread::sleep; use std::time::Duration;
let mut spinner = spinoff::new(Spinners::Dots, "Loading...", "blue".into()); sleep(Duration::fromsecs(3)); spinner = spinner.update(Spinners::Dots2, "Loading...", None); sleep(Duration::fromsecs(3)); spinner.stopandpersist("👨💻", "Done!"); ```
Spinner
options, check the Spinners
enum.To run some of the included examples, use:
bash
cargo run --example all_spinners
bash
cargo run --example simple
Any contributions to this crate are highly appreciated. If you have any ideas/suggestions/bug fixes, please open an issue or pull request.
This crate is licensed under the MIT license.