terminal-spinners

Crates.ioterminal-spinners
lib.rsterminal-spinners
version0.3.2
sourcesrc
created_at2021-03-05 01:16:40.516437
updated_at2021-12-20 17:30:00.234203
descriptionA library for showing terminal loading animations
homepage
repositoryhttps://github.com/mainrs/terminal-spinners-rs
max_upload_size
id364007
size86,002
mainrs (mainrs)

documentation

README

terminal-spinners

A Rust library for showing terminal loading animations.

Usage

use terminal_spinners::{SpinnerBuilder, DOTS};

let handle = SpinnerBuilder::new().spinner(&DOTS).text("Loading unicorns").start();
// Do some other work...
std::thread::sleep(std::time::Duration::from_secs(3));
handle.done();

The examples/ directory contains an example for each available spinner. To see them in action, run cargo run --example <name>. Additional examples for showcasing other functionality are:

Filename Desc
clear_line Showcases SpinnerHandle::stop_and_clear

Shortcomings

  • It's not possible to run multiple spinners at once. This probably needs an API change. Open for help/PR!

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Commit count: 50

cargo fmt