3 releases (breaking)

0.3.0 Jun 27, 2021
0.2.0 Feb 1, 2021
0.1.0 Feb 1, 2021

#14 in #buf

Download history 474/week @ 2023-11-18 877/week @ 2023-11-25 382/week @ 2023-12-02 648/week @ 2023-12-09 272/week @ 2023-12-16 322/week @ 2023-12-23 286/week @ 2023-12-30 497/week @ 2024-01-06 568/week @ 2024-01-13 580/week @ 2024-01-20 529/week @ 2024-01-27 185/week @ 2024-02-03 1370/week @ 2024-02-10 740/week @ 2024-02-17 909/week @ 2024-02-24 679/week @ 2024-03-02

3,705 downloads per month
Used in 2 crates

Unlicense

9KB
146 lines

Liveterm

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
}

lib.rs:

Print stuff to the terminal, remove it, repeat!

Here's how to use it:

use liveterm::TermPrinter;
use std::fmt::Write;
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
}

Dependencies

~2.5MB
~40K SLoC