inquire 0.7.5

inquire is a library for building interactive prompts on terminals
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use inquire::{Password, PasswordDisplayMode};

fn main() {
    let name = Password::new("RSA Encryption Key:")
        .with_display_mode(PasswordDisplayMode::Masked)
        .prompt();

    match name {
        Ok(_) => println!("This doesn't look like a key."),
        Err(_) => println!("An error happened when asking for your key, try again later."),
    }
}