raw_tty
This crate can be used for generally interacting with a tty's mode safely, but was created originally to solve the problem of using raw mode with /dev/tty while reading stdin for data.
Usage
Raw Mode
Description from the termion
crate:
Managing raw mode.
Raw mode is a particular state a TTY can have. It signifies that:
- No line buffering (the input is given byte-by-byte).
- The input is not written out, instead it has to be done manually by the programmer.
- The output is not canonicalized (for example,
\n
means "go one line down", not "line break").
It is essential to design terminal programs.
Example
use IntoRawMode;
use ;
Example with /dev/tty
use IntoRawMode;
use ;
use fs;
General example
use GuardMode;
use ;