Crates.io | typout |
lib.rs | typout |
version | 0.2.2 |
source | src |
created_at | 2020-04-22 07:58:42.323615 |
updated_at | 2020-07-08 22:20:45.953286 |
description | Command-line typewriter output stream. |
homepage | https://github.com/xpepermint/typout |
repository | https://github.com/xpepermint/typout |
max_upload_size | |
id | 232832 |
size | 25,077 |
Command-line typewriter output stream.
This crate provides a wrapper around the stdout and allows for writing messages to the terminal output.
let mut out = Typout::default();
// write a simple message
out.write("Hello");
out.write(" World!");
out.flush(); // -> Hello World!
// pin/unpin a message to the end
out.pin("ID1", "Please wait ...");
out.unpin("ID1");
// spin/unpin an animated message to the end
out.spin("ID2", "Processing ...");
out.unpin("ID1");
See it in action by running cargo run --example simulate
.