Struct pseudoterm::RawTerminal
source · pub struct RawTerminal<F: AsRawFd> { /* private fields */ }
Expand description
A structure that will automatically reset terminal mode when dropped
Implementations
sourceimpl<F: AsRawFd> RawTerminal<F>
impl<F: AsRawFd> RawTerminal<F>
sourcepub fn new(file: F) -> Result<Self>
pub fn new(file: F) -> Result<Self>
Switch the terminal to raw mode and return a wrapper that will exit raw mode automatically when dropped
sourcepub fn new_allow_failure(file: F) -> Self
pub fn new_allow_failure(file: F) -> Self
Like new(), but ignores any failure. Useful for switching to raw mode only if that’s actually possible.
Trait Implementations
sourceimpl<F: AsRawFd> Deref for RawTerminal<F>
impl<F: AsRawFd> Deref for RawTerminal<F>
sourceimpl<F: AsRawFd> DerefMut for RawTerminal<F>
impl<F: AsRawFd> DerefMut for RawTerminal<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for RawTerminal<F>where
F: RefUnwindSafe,
impl<F> Send for RawTerminal<F>where
F: Send,
impl<F> Sync for RawTerminal<F>where
F: Sync,
impl<F> Unpin for RawTerminal<F>where
F: Unpin,
impl<F> UnwindSafe for RawTerminal<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more