[][src]Struct blinds::EventStream

pub struct EventStream { /* fields omitted */ }

The source of events for a blinds application

An EventStream instance is supplied by run, so creating one is not necessary. Use the next_event function to wait for Events.

Implementations

impl EventStream[src]

pub fn next_event<'a>(&'a mut self) -> impl 'a + Future<Output = Option<Event>>[src]

Returns a future that will provide the next Event, or None if the events are exhausted

If there are no events, the Future will wait until new events are received, allowing the OS or browser to take back control of the event loop. If this doesn't get run, desktop windows will freeze and browser windows will lock up, so it's important to call and .await the Future even if the events are ignored.

Auto Trait Implementations

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.