Crates.io | liveterm |
lib.rs | liveterm |
version | 0.3.0 |
source | src |
created_at | 2021-02-01 04:29:19.817172 |
updated_at | 2021-06-27 09:32:47.648079 |
description | Simple live-updating output for CLI apps |
homepage | |
repository | https://git.sr.ht/~asayers/liveterm |
max_upload_size | |
id | 349125 |
size | 19,058 |
Print stuff to the terminal, remove it, repeat!
Here's how to use it:
let mut tp = TermPrinter::new(std::io::stdout());
for i in 0..10 {
tp.clear()?; // clear what we draw last time
tp.buf.clear(); // clear the buffer
write!(tp.buf, "{}", i)?; // fill the buffer
tp.print()?; // draw the buffer
}