2 releases
0.1.1 | Oct 3, 2024 |
---|---|
0.1.0 | Aug 9, 2024 |
#350 in Command-line interface
4KB
50 lines
Cargo.toml
alternate_screen_wraper = { version = "<current-version>", features = "crossterm" } # or other backand
main.rs
fn main() {
let alternate_screen = alternater_screen_wrapper::AlternateScreen::enter();
// ..do some work
let printable = // do other work
//
drop(alternate_screen);
println!("{printable}"); // it works
}
You can don't call drop manually. It will be dropped automatically when you exiting scope or panicing.
Dependencies
~0–8MB
~79K SLoC