typout

Crates.iotypout
lib.rstypout
version0.2.2
sourcesrc
created_at2020-04-22 07:58:42.323615
updated_at2020-07-08 22:20:45.953286
descriptionCommand-line typewriter output stream.
homepagehttps://github.com/xpepermint/typout
repositoryhttps://github.com/xpepermint/typout
max_upload_size
id232832
size25,077
Kristijan Sedlak (xpepermint)

documentation

https://github.com/xpepermint/typout

README

Command-line typewriter output stream.

This crate provides a wrapper around the stdout and allows for writing messages to the terminal output.

Usage

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.

Commit count: 17

cargo fmt