pub struct ProcessTerminal { /* private fields */ }Expand description
Process-based terminal using crossterm.
Implementations§
Trait Implementations§
Source§impl Default for ProcessTerminal
impl Default for ProcessTerminal
Source§impl Terminal for ProcessTerminal
impl Terminal for ProcessTerminal
Source§fn info(&self) -> TerminalInfo
fn info(&self) -> TerminalInfo
Get terminal information (columns, rows, capabilities).
Source§fn hide_cursor(&self)
fn hide_cursor(&self)
Hide the cursor.
Source§fn show_cursor(&self)
fn show_cursor(&self)
Show the cursor.
Source§fn move_cursor(&self, row: usize, col: usize)
fn move_cursor(&self, row: usize, col: usize)
Move cursor to position (0-indexed).
Source§fn clear_screen(&self)
fn clear_screen(&self)
Clear the screen.
Source§fn enable_mouse(&self)
fn enable_mouse(&self)
Enable mouse events.
Source§fn disable_mouse(&self)
fn disable_mouse(&self)
Disable mouse events.
Source§fn enter_raw_mode(&self)
fn enter_raw_mode(&self)
Enter terminal raw mode (required for
event::read() to deliver
individual key events without line buffering). Pairs with
Terminal::stop, which exits raw mode. Read moreSource§fn exit_raw_mode(&self)
fn exit_raw_mode(&self)
Leave raw mode without stopping the terminal, so the shell gets a
working line discipline back. Pairs with
Terminal::enter_raw_mode;
a Ctrl+Z suspend uses it, then re-enters raw mode on resume.Source§fn refresh_size(&self)
fn refresh_size(&self)
Re-read the current terminal size into the cached
TerminalInfo.
Called on Event::Resize so subsequent renders use the new dimensions.Source§fn start(
&self,
on_input: Box<dyn Fn(InputEvent) + Send + Sync>,
on_resize: Box<dyn Fn() + Send + Sync>,
)
fn start( &self, on_input: Box<dyn Fn(InputEvent) + Send + Sync>, on_resize: Box<dyn Fn() + Send + Sync>, )
Start terminal raw mode.
Source§fn set_progress(&self, active: bool)
fn set_progress(&self, active: bool)
Set progress indicator (terminal progress bar support).
Auto Trait Implementations§
impl !Freeze for ProcessTerminal
impl RefUnwindSafe for ProcessTerminal
impl Send for ProcessTerminal
impl Sync for ProcessTerminal
impl Unpin for ProcessTerminal
impl UnsafeUnpin for ProcessTerminal
impl UnwindSafe for ProcessTerminal
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