[−][src]Struct mortal::screen::ScreenReadGuard
Holds an exclusive lock for read operations on a Screen
See Screen
documentation for details on locking.
Methods
impl<'a> ScreenReadGuard<'a>
[src]
pub fn wait_event(&mut self, timeout: Option<Duration>) -> Result<bool>
[src]
Waits for an event from the terminal.
Returns Ok(false)
if timeout
elapses without an event occurring.
If timeout
is None
, this method will wait indefinitely.
Notes
Some low-level terminal events may not generate an Event
value.
Therefore, this method may return Ok(true)
, while a follow-up call
to read_event
may not immediately return an event.
pub fn read_event(&mut self, timeout: Option<Duration>) -> Result<Option<Event>>
[src]
Reads an event from the terminal.
If timeout
elapses without an event occurring, this method will return
Ok(None)
.
If timeout
is None
, this method will wait indefinitely.
Trait Implementations
impl<'a> TerminalExt for ScreenReadGuard<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for ScreenReadGuard<'a>
impl<'a> !Send for ScreenReadGuard<'a>
impl<'a> Sync for ScreenReadGuard<'a>
impl<'a> Unpin for ScreenReadGuard<'a>
impl<'a> UnwindSafe for ScreenReadGuard<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,