https://github.com/xpepermint/typout
Typewriter output stream.
https://github.com/xpepermint/typout
cargo command-line console crate memory output rust stream write
Last synced: 4 months ago
JSON representation
Typewriter output stream.
- Host: GitHub
- URL: https://github.com/xpepermint/typout
- Owner: xpepermint
- License: mit
- Created: 2020-04-22T08:02:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-23T12:48:14.000Z (over 2 years ago)
- Last Synced: 2025-10-08T08:46:25.799Z (4 months ago)
- Topics: cargo, command-line, console, crate, memory, output, rust, stream, write
- Language: Rust
- Size: 36.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
> Command-line typewriter output stream.
This crate provides a wrapper around the stdout and allows for writing messages to the terminal output.
## Usage
```rs
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`.