5 releases
0.1.0 | May 10, 2024 |
---|---|
0.0.4 | Apr 25, 2024 |
0.0.3 | Apr 25, 2024 |
0.0.2 | Apr 24, 2024 |
0.0.1 | Apr 23, 2024 |
#16 in #spinner
266 downloads per month
45KB
156 lines
rspinner
rust spinner
Install
See Cargo page
Usage
use rspinner::Spinner;
use std::thread::sleep;
use std::time::Duration;
fn main() {
let mut spinner = Spinner::new(Some("new spinner..."));
sleep(Duration::from_secs(2));
spinner.start(Some("Start - 1"));
sleep(Duration::from_secs(2));
spinner.success(Some("Success!"));
// spinner.error(Some("Has Error!"));
spinner.start(Some("Start - 2"));
sleep(Duration::from_secs(2));
spinner.error(Some("Has Error!"));
sleep(Duration::from_secs(1));
spinner.warning(None);
sleep(Duration::from_secs(1));
spinner.info(None);
}
Example
cargo run --example run
Dependencies
~0–9.5MB
~41K SLoC