pub struct NativeTerminal { /* private fields */ }Expand description
One owned connection to the process’s controlling terminal.
Input, output, raw mode, window inspection, protocol replies, and ordinary
events all use the same /dev/tty endpoint. No external terminal framework
participates in this backend.
Implementations§
Source§impl NativeTerminal
impl NativeTerminal
Sourcepub fn open() -> Result<Self>
pub fn open() -> Result<Self>
Opens the process’s controlling terminal as one input/output endpoint.
Sourcepub fn terminal_info(&mut self) -> Result<TerminalInfo>
pub fn terminal_info(&mut self) -> Result<TerminalInfo>
Inspects the terminal endpoint opened by this backend.
Trait Implementations§
Source§impl CommandWriter for NativeTerminal
impl CommandWriter for NativeTerminal
Source§impl Drop for NativeTerminal
impl Drop for NativeTerminal
Source§impl EventSource for NativeTerminal
impl EventSource for NativeTerminal
Source§impl KeyboardEnhancementQuery for NativeTerminal
impl KeyboardEnhancementQuery for NativeTerminal
fn supports_keyboard_enhancement(&mut self) -> Result<bool>
Source§impl RawModeControl for NativeTerminal
impl RawModeControl for NativeTerminal
fn is_interactive(&self) -> bool
fn enable_raw_mode(&mut self) -> Result<()>
fn disable_raw_mode(&mut self) -> Result<()>
Source§impl TerminalOutput for NativeTerminal
impl TerminalOutput for NativeTerminal
Source§impl TerminalQuery for NativeTerminal
impl TerminalQuery for NativeTerminal
Source§fn terminal_size(&mut self) -> Result<TerminalSize>
fn terminal_size(&mut self) -> Result<TerminalSize>
Queries the current visible size in character cells.
Source§fn cursor_position(&mut self) -> Result<Position>
fn cursor_position(&mut self) -> Result<Position>
Queries the current zero-based cursor position.
Source§fn window_size(&mut self) -> Result<WindowSize>
fn window_size(&mut self) -> Result<WindowSize>
Queries both cell and pixel dimensions when the platform exposes them.
Source§fn raw_mode_enabled(&mut self) -> Result<bool>
fn raw_mode_enabled(&mut self) -> Result<bool>
Reports whether process terminal input is currently in raw mode.
Source§fn terminal_capabilities(&mut self) -> Result<TerminalCapabilities>
fn terminal_capabilities(&mut self) -> Result<TerminalCapabilities>
Queries rendering capabilities confirmed by the terminal. Read more
Source§fn terminal_background(&mut self) -> Result<Option<TerminalBackground>>
fn terminal_background(&mut self) -> Result<Option<TerminalBackground>>
Queries the terminal’s current background color. Read more
Auto Trait Implementations§
impl Freeze for NativeTerminal
impl RefUnwindSafe for NativeTerminal
impl Send for NativeTerminal
impl Sync for NativeTerminal
impl Unpin for NativeTerminal
impl UnsafeUnpin for NativeTerminal
impl UnwindSafe for NativeTerminal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more