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§
Sourcefn is_echo_enabled(&self) -> bool
fn is_echo_enabled(&self) -> bool
Returns whether local echo is enabled.
Sourcefn set_canonical(&self, enabled: bool)
fn set_canonical(&self, enabled: bool)
Enable or disable canonical (line) mode.
Sourcefn is_canonical(&self) -> bool
fn is_canonical(&self) -> bool
Returns whether canonical (line) mode is enabled.
Sourcefn set_winsize(&self, cols: u16, rows: u16)
fn set_winsize(&self, cols: u16, rows: u16)
Set terminal window size in character cells.
Sourcefn get_winsize(&self) -> (u16, u16)
fn get_winsize(&self) -> (u16, u16)
Get terminal window size in character cells.