termion::raw

Trait IntoRawMode

Source
pub trait IntoRawMode: Write + Sized {
    // Required method
    fn into_raw_mode(self) -> Result<RawTerminal<Self>>;
}
Expand description

Types which can be converted into “raw mode”.

§Why is this type defined on writers and not readers?

TTYs has their state controlled by the writer, not the reader. You use the writer to clear the screen, move the cursor and so on, so naturally you use the writer to change the mode as well.

Required Methods§

Source

fn into_raw_mode(self) -> Result<RawTerminal<Self>>

Switch to raw mode.

Raw mode means that stdin won’t be printed (it will instead have to be written manually by the program). Furthermore, the input isn’t canonicalised or buffered (that is, you can read from stdin one byte of a time). The output is neither modified in any way.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<W: Write> IntoRawMode for W