spinach-1.0.0 has been yanked.
🥬 spinach
Practical spinner for Rust
Install
Add as a dependency to your Cargo.toml.
[]
= "1.0"
Usage
Basic example.
use sleep;
use Duration;
use Spinach;
Creating
use ;
// Using defaults + custom text
let s = new;
// Using custom spinner
let spinner = new;
let s = new_with;
// Also with partial config (fallback to defaults)
let s = new_with;
Updating
use ;
let s = new;
// Updating text
s.text;
// Updating color
s.color;
// Updating multiple
s.update_with;
// Also with partial update (keep current)
s.update_with;
Stopping
use ;
let s = new;
// Stop with final `✔` frame, green color and optional text change.
s.success;
// Stop with final `✖` frame, red color and optional text change.
s.fail;
// Stop with final `âš ` frame, yellow color and optional text change.
s.warn;
// Stop with final `ℹ` frame, blue color and optional text change.
s.info;
// Stop current spinner (freeze the frame)
s.stop;
// Stopping with custom final frame, text and color
s.stop_with;
// Also with partial update (keep current)
s.stop_with;
Related
Inspired by: