Struct mortal::screen::ScreenReadGuard
source · [−]pub struct ScreenReadGuard<'a>(_);
Expand description
Holds an exclusive lock for read operations on a Screen
See Screen
documentation for details on locking.
Implementations
sourceimpl<'a> ScreenReadGuard<'a>
impl<'a> ScreenReadGuard<'a>
sourcepub fn wait_event(&mut self, timeout: Option<Duration>) -> Result<bool>
pub fn wait_event(&mut self, timeout: Option<Duration>) -> Result<bool>
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.
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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