Skip to main content

EventPump

Struct EventPump 

Source
pub struct EventPump<M> { /* private fields */ }
Expand description

The merged event queue and the thread that reads the terminal.

Implementations§

Source§

impl<M: Send + 'static> EventPump<M>

Source

pub fn start() -> Self

A pump reading the controlling terminal, in raw mode until EventPump::finish. With no terminal it carries messages only.

Source

pub fn watch_pane_visibility(&self, program: &str)

Report what the multiplexer program lets our pane show.

Source

pub fn reads_terminal(&self) -> bool

Whether a terminal is being read.

Source

pub fn waker(&self) -> Waker<M>

A handle other threads use to queue messages.

Source

pub fn next(&mut self, wait: Duration) -> Option<Signal<M>>

The next item, waiting at most wait.

Source

pub fn await_answer(&mut self, image: u32, wait: Duration) -> bool

Wait for the graphics answer naming image, holding everything else for later; false when no answer arrives within wait.

Source

pub fn await_device_attributes(&mut self, wait: Duration) -> bool

Wait for the device attributes answer, holding everything else for later; false when no answer arrives within wait.

Source

pub fn finish(self)

Stop reading and leave raw mode once input goes quiet, so that answers and key releases still on their way never reach the shell.

Trait Implementations§

Source§

impl<M: Debug> Debug for EventPump<M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M> Drop for EventPump<M>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<M> !RefUnwindSafe for EventPump<M>

§

impl<M> !Sync for EventPump<M>

§

impl<M> !UnwindSafe for EventPump<M>

§

impl<M> Forget for EventPump<M>

§

impl<M> Freeze for EventPump<M>

§

impl<M> Move for EventPump<M>

§

impl<M> Send for EventPump<M>

§

impl<M> Unpin for EventPump<M>

§

impl<M> UnsafeUnpin for EventPump<M>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.