dont_disappear 2.1.7

Tiny crates that stops the console window form closing when the program finishes.
Documentation

Dont Disappear

Tiny crates that stops the console window form closing when the program finishes. pipeline status License Latest version Latest Docs downloads-badge

Why you need it.

When making an app without a GUI sometimes you display some information before the program ends. If you send this program to someone and they run it in the windows command prompt or many other consoles the window may close before showing the data. This crate allows the user to wait until they have read the data before they close the window.

How to use example.

This is one example of one of the ways you could use one of the dont_disappear functions.

extern crate dont_disappear;

fn main() {
    println!("Here is some data");
    dont_disappear::any_key_to_continue::default();
}

Features

Close with any key.

Close with enter key.

Close with window manager.

Examples

Any key to continue

cargo run --example any_key_to_continue

Enter to continue

cargo run --example enter_to_continue

Close with window manager.

cargo run --example press_close

Docs

API docs

Dependencies

This project uses crossterm 0.4 in the any_key_to_continue module.

Downloads

Docs

Warning

If you are viewing this from GitHub then this is a read only copy. Please contribute to the GitLab copy here.