pub struct CrosstermBackend<W> { /* private fields */ }Expand description
The initial terminal backend, implemented with crossterm behind this module.
Implementations§
Source§impl<W> CrosstermBackend<W>
impl<W> CrosstermBackend<W>
pub const fn new(writer: W) -> Self
pub const fn writer(&self) -> &W
pub fn writer_mut(&mut self) -> &mut W
pub fn into_inner(self) -> W
Trait Implementations§
Source§impl<W: Write> CommandWriter for CrosstermBackend<W>
impl<W: Write> CommandWriter for CrosstermBackend<W>
Source§impl<W> EventSource for CrosstermBackend<W>
impl<W> EventSource for CrosstermBackend<W>
Source§impl<W> KeyboardEnhancementQuery for CrosstermBackend<W>
impl<W> KeyboardEnhancementQuery for CrosstermBackend<W>
fn supports_keyboard_enhancement(&mut self) -> Result<bool>
Source§impl<W: Write + IsTerminal> RawModeControl for CrosstermBackend<W>
impl<W: Write + IsTerminal> RawModeControl for CrosstermBackend<W>
fn is_interactive(&self) -> bool
fn enable_raw_mode(&mut self) -> Result<()>
fn disable_raw_mode(&mut self) -> Result<()>
Source§impl<W: Write> TerminalOutput for CrosstermBackend<W>
impl<W: Write> TerminalOutput for CrosstermBackend<W>
Source§impl<W> TerminalQuery for CrosstermBackend<W>
impl<W> TerminalQuery for CrosstermBackend<W>
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<W> Freeze for CrosstermBackend<W>where
W: Freeze,
impl<W> RefUnwindSafe for CrosstermBackend<W>where
W: RefUnwindSafe,
impl<W> Send for CrosstermBackend<W>where
W: Send,
impl<W> Sync for CrosstermBackend<W>where
W: Sync,
impl<W> Unpin for CrosstermBackend<W>where
W: Unpin,
impl<W> UnsafeUnpin for CrosstermBackend<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for CrosstermBackend<W>where
W: UnwindSafe,
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