Crates.io | terminal-prompt |
lib.rs | terminal-prompt |
version | 0.2.3 |
source | src |
created_at | 2023-08-03 15:39:10.800518 |
updated_at | 2023-08-09 19:36:34.206738 |
description | Tiny library for prompting sensitive or non-sensitive data on the terminal |
homepage | |
repository | https://github.com/de-vri-es/terminal-prompt-rs |
max_upload_size | |
id | 933718 |
size | 18,307 |
Tiny library for prompting sensitive or non-sensitive data on the terminal.
The only dependency is libc
on Unix and winapi
on Windows.
See Terminal
for the API documentation.
Read a username and password from the terminal:
use terminal_prompt::Terminal;
let mut terminal = Terminal::open()?;
let username = terminal.prompt("Username: ")?;
let password = terminal.prompt_sensitive("Password: ")?;