TtyControl

Trait TtyControl 

Source
pub trait TtyControl {
    // Required methods
    fn set_echo(&self, enabled: bool);
    fn is_echo_enabled(&self) -> bool;
    fn set_canonical(&self, enabled: bool);
    fn is_canonical(&self) -> bool;
    fn set_winsize(&self, cols: u16, rows: u16);
    fn get_winsize(&self) -> (u16, u16);
}
Expand description

OS/ABI-agnostic TTY control interface

This trait intentionally avoids Linux/POSIX terms and numbers. ABI adapters (e.g., abi/linux) should translate their own termios/ioctl to these neutral controls.

Required Methods§

Source

fn set_echo(&self, enabled: bool)

Enable or disable local echo.

Source

fn is_echo_enabled(&self) -> bool

Returns whether local echo is enabled.

Source

fn set_canonical(&self, enabled: bool)

Enable or disable canonical (line) mode.

Source

fn is_canonical(&self) -> bool

Returns whether canonical (line) mode is enabled.

Source

fn set_winsize(&self, cols: u16, rows: u16)

Set terminal window size in character cells.

Source

fn get_winsize(&self) -> (u16, u16)

Get terminal window size in character cells.

Implementors§