[][src]Struct crossterm::SyncReader

pub struct SyncReader { /* fields omitted */ }

This type allows you to read input synchronously, which means that reading calls will block.

This type is an iterator, and can be used to iterate over input events.

If you don't want to block your calls use AsyncReader, which will read input on the background and queue it for you to read.

Trait Implementations

impl Iterator for SyncReader[src]

type Item = InputEvent

The type of the elements being iterated over.

fn next(&mut self) -> Option<<SyncReader as Iterator>::Item>[src]

Read input from the user.

If there are no keys pressed, this will be a blocking call until there is one. This will return None in case of a failure and Some(InputEvent) in case of an occurred input event.

Auto Trait Implementations

Blanket Implementations

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From<T> for 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.

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

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]