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

Download history 8/week @ 2024-07-26 1/week @ 2024-08-02 1/week @ 2024-09-20 2/week @ 2024-09-27 1/week @ 2024-10-04

266 downloads per month

MIT license

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);
}

rspinner

Example

cargo run --example run

Dependencies

~0–9.5MB
~41K SLoC