[][src]Struct ndless_async::task::AsyncListeners

pub struct AsyncListeners { /* fields omitted */ }

Handler for listening to system events.

Create one with AsyncListeners::default() and pass it to block_on, as well as your future. See the module-level documentation for more.

Implementations

impl AsyncListeners[src]

pub fn new() -> Self[src]

pub fn timer(&self) -> &TimerListener[src]

Returns a TimerListener instance, which may be used to schedule timers.

pub fn yield_now(&self) -> Yield[src]

Allows other tasks to run before coming back to this one. Useful when doing something computationally intensive, to allow things like keyboard handlers and timers to run. Note that the calculator will not go to sleep if this is called in a loop. Use timer instead if a delay is desired between each iteration. If no other tasks are scheduled, this task is continued immediately.

Trait Implementations

impl Default for AsyncListeners[src]

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.