[−][src]Struct ndless_async::task::AsyncListeners
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]
fn default() -> AsyncListeners
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,