pub struct Tty { /* private fields */ }Expand description
The process’s own terminal (stdin and stdout), in raw mode while it lives.
Implementations§
Trait Implementations§
Source§impl Terminal for Tty
Available on Unix or Windows only.
impl Terminal for Tty
Available on Unix or Windows only.
Source§fn read(
&mut self,
buf: &mut [u8],
timeout: Option<Duration>,
) -> Result<Option<usize>>
fn read( &mut self, buf: &mut [u8], timeout: Option<Duration>, ) -> Result<Option<usize>>
Reads available input into
buf, waiting at most timeout (None
waits for input). Ok(None) means the wait timed out; Ok(Some(0))
that the input is closed. Read moreAuto Trait Implementations§
impl Freeze for Tty
impl RefUnwindSafe for Tty
impl Send for Tty
impl Sync for Tty
impl Unpin for Tty
impl UnsafeUnpin for Tty
impl UnwindSafe for Tty
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