6 releases (1 stable)
Uses new Rust 2024
| 1.0.0 | Nov 16, 2025 |
|---|---|
| 0.1.4 | Feb 28, 2021 |
#323 in Video
Used in 3 crates
15KB
212 lines
Throbber
This crate serves as an alternative to loading. It is used to display a throbber animation in the terminal while other calculations are done in the main program.

Docs
Example
use std::thread;
use std::time::Duration;
use throbber::Throbber;
fn main() {
let mut throbber = Throbber::default().message("calculating stuff");
throbber.start();
// do stuff
thread::sleep(Duration::from_secs(2));
throbber.success("Success");
throbber.start_with_msg("calculating more stuff");
// do other stuff
thread::sleep(Duration::from_secs(2));
throbber.fail("Fail");
}