[][src]Struct mortal::screen::ScreenReadGuard

pub struct ScreenReadGuard<'a>(_);

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.