pub struct TerminalGuard { /* private fields */ }Expand description
RAII guard that enables raw mode + (optionally) alt screen on construction and restores the terminal on drop (including during panic unwind).
with_alt_screen = false is the less -X / --no-init mode: stay on
the primary screen so content remains in scrollback after exit. Raw
mode is still enabled because we need keystroke capture either way.
Implementations§
Trait Implementations§
Source§impl Drop for TerminalGuard
impl Drop for TerminalGuard
Auto Trait Implementations§
impl Freeze for TerminalGuard
impl RefUnwindSafe for TerminalGuard
impl Send for TerminalGuard
impl Sync for TerminalGuard
impl Unpin for TerminalGuard
impl UnsafeUnpin for TerminalGuard
impl UnwindSafe for TerminalGuard
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