tinsel 0.4.0

Clean terminal output with a little sparkle: live step lists, spinners, tables, trees, prompts and more.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! The smallest useful tinsel program: a spinner around some work, then a message.
//!
//!   cargo run --example hello

use std::thread::sleep;
use std::time::Duration;

fn main() {
    let files = tinsel::spin("Counting files", || {
        sleep(Duration::from_millis(1200));
        412
    });
    tinsel::success(&format!("found {files} files"));
    tinsel::hint("run with --verbose to list them");
}