Trait termion::input::TermRead

source ·
pub trait TermRead {
    // Required methods
    fn events(self) -> Events<Self> 
       where Self: Sized;
    fn keys(self) -> Keys<Self> 
       where Self: Sized;
    fn read_line(&mut self) -> Result<Option<String>>;

    // Provided method
    fn read_passwd<W: Write>(
        &mut self,
        writer: &mut W
    ) -> Result<Option<String>> { ... }
}
Expand description

Extension to Read trait.

Required Methods§

source

fn events(self) -> Events<Self>
where Self: Sized,

An iterator over input events.

source

fn keys(self) -> Keys<Self>
where Self: Sized,

An iterator over key inputs.

source

fn read_line(&mut self) -> Result<Option<String>>

Read a line.

EOT and ETX will abort the prompt, returning None. Newline or carriage return will complete the input.

Provided Methods§

source

fn read_passwd<W: Write>(&mut self, writer: &mut W) -> Result<Option<String>>

Read a password.

EOT and ETX will abort the prompt, returning None. Newline or carriage return will complete the input.

Object Safety§

This trait is not object safe.

Implementors§