Trait mortal::unix::TerminalExt [−][src]
pub trait TerminalExt: Private { fn read_raw(
&mut self,
buf: &mut [u8],
timeout: Option<Duration>
) -> Result<Option<Event>>; }
Implements Unix-only extensions for terminal interfaces.
Required Methods
fn read_raw(
&mut self,
buf: &mut [u8],
timeout: Option<Duration>
) -> Result<Option<Event>>
&mut self,
buf: &mut [u8],
timeout: Option<Duration>
) -> Result<Option<Event>>
Reads raw data from the terminal.
Data read will be UTF-8 encoded, but may be incomplete. The caller may
consume any valid UTF-8 data before performing another read_raw
call
to complete previously read data.
If timeout
elapses without an event occurring, this method will return
Ok(None)
. If timeout
is None
, this method will wait indefinitely.
Implementors
impl TerminalExt for Screen
impl<'a> TerminalExt for ScreenReadGuard<'a>
impl TerminalExt for Terminal
impl<'a> TerminalExt for TerminalReadGuard<'a>