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) -> CrosstermBackend<W>
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> CommandWriter for CrosstermBackend<W>where
W: Write,
impl<W> CommandWriter for CrosstermBackend<W>where
W: Write,
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>
Source§impl<W> RawModeControl for CrosstermBackend<W>where
W: Write + IsTerminal,
impl<W> RawModeControl for CrosstermBackend<W>where
W: Write + IsTerminal,
Source§impl<W> TerminalOutput for CrosstermBackend<W>where
W: Write,
impl<W> TerminalOutput for CrosstermBackend<W>where
W: Write,
Source§impl<W> TerminalQuery for CrosstermBackend<W>
impl<W> TerminalQuery for CrosstermBackend<W>
Source§fn terminal_size(&mut self) -> Result<TerminalSize, Error>
fn terminal_size(&mut self) -> Result<TerminalSize, Error>
Queries the current visible size in character cells.
Source§fn cursor_position(&mut self) -> Result<Position, Error>
fn cursor_position(&mut self) -> Result<Position, Error>
Queries the current zero-based cursor position.
Source§fn window_size(&mut self) -> Result<WindowSize, Error>
fn window_size(&mut self) -> Result<WindowSize, Error>
Queries both cell and pixel dimensions when the platform exposes them.
Source§fn raw_mode_enabled(&mut self) -> Result<bool, Error>
fn raw_mode_enabled(&mut self) -> Result<bool, Error>
Reports whether process terminal input is currently in raw mode.
Source§fn terminal_capabilities(&mut self) -> Result<TerminalCapabilities, Error>
fn terminal_capabilities(&mut self) -> Result<TerminalCapabilities, Error>
Queries rendering capabilities confirmed by the terminal. Read more
Source§fn terminal_background(&mut self) -> Result<Option<TerminalBackground>, Error>
fn terminal_background(&mut self) -> Result<Option<TerminalBackground>, Error>
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