File: README.md

package info (click to toggle)
rust-terminal-prompt 0.2.3-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 116 kB
  • sloc: makefile: 11
file content (18 lines) | stat: -rw-r--r-- 540 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# terminal-prompt

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.

## Example
Read a username and password from the terminal:
```rust
use terminal_prompt::Terminal;
let mut terminal = Terminal::open()?;
let username = terminal.prompt("Username: ")?;
let password = terminal.prompt_sensitive("Password: ")?;
```

[`Terminal`]: https://docs.rs/terminal-prompt/latest/terminal_prompt/struct.Terminal.html