spinoff

spinoff is a simple to use library for displaying spinners in the terminal, with plenty of features and options.

Version Downloads Docs




Usage

```rust use spinoff::{Spinner, Spinners}; use std::thread::sleep; use std::time::Duration;

let spinner = Spinner::new(Spinners::Dots, "Loading...", Some(Color::Blue)); sleep(Duration::from_secs(3)); spinner.success("Done!"); ```

Update a spinner

```rust use spinoff::{Spinner, Spinners}; use std::thread::sleep; use std::time::Duration;

let mut spinner = Spinner::new(Spinners::Dots, "Loading...", Some(Color::Blue)); sleep(Duration::fromsecs(3)); spinner.update(Spinners::Dots2, "Loading...", None); sleep(Duration::fromsecs(3)); spinner.stopandpersist("👨‍💻", "Done!"); ```

Documentation

Examples

To run some of the included examples, use: bash cargo run --example all_spinners

bash cargo run --example simple

Contributing

Any contributions to this crate are highly appreciated. If you have any ideas/suggestions/bug fixes, please open an issue or pull request.

License

This crate is licensed under the MIT license.