pub struct TerminalRawModeScope { /* private fields */ }
Expand description
Enable or disable the terminal raw mode while its instance is in scope.
While it automatically resets the mode when it’s out of scope,
reset()
should be called at the end
to avoid it being dropped earlier.
§Examples
use git_iblame::TerminalRawModeScope;
let mut terminal_raw_mode = TerminalRawModeScope::new(true)?;
// Do work.
terminal_raw_mode.reset();
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TerminalRawModeScope
impl RefUnwindSafe for TerminalRawModeScope
impl Send for TerminalRawModeScope
impl Sync for TerminalRawModeScope
impl Unpin for TerminalRawModeScope
impl UnwindSafe for TerminalRawModeScope
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