alternate_screen_wrapper 0.1.1

enter end leave alternate screen in one line
Documentation
  • Coverage
  • 0%
    0 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 11.92 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 73.90 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sineptic

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.