alternate_screen_wrapper

Crates.ioalternate_screen_wrapper
lib.rsalternate_screen_wrapper
version0.3.3
created_at2024-08-09 15:09:27.195498+00
updated_at2025-09-19 16:10:28.736893+00
descriptionenter end leave alternate screen in one line
homepage
repositoryhttps://github.com/sineptic/alternate_screen_wrapper
max_upload_size
id1330999
size17,163
sineptic (sineptic)

documentation

README

Cargo.toml

alternate_screen_wrapper = { version = "<current-version>", features = ["crossterm"] } # add "crossterm-bracketed-paste" to enable it

main.rs

fn main() {
    let alternate_screen = alternate_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 exit scope or panic.

Commit count: 13

cargo fmt