[][src]Struct druid_shell::IdleHandle

pub struct IdleHandle(_);

A handle that can enqueue tasks on the window loop.

Implementations

impl IdleHandle[src]

pub fn add_idle<F>(&self, callback: F) where
    F: FnOnce(&dyn Any) + Send + 'static, 
[src]

Add an idle handler, which is called (once) when the message loop is empty. The idle handler will be run from the main UI thread, and won't be scheduled if the associated view has been dropped.

Note: the name "idle" suggests that it will be scheduled with a lower priority than other UI events, but that's not necessarily the case.

pub fn schedule_idle(&mut self, token: IdleToken)[src]

Request a callback from the runloop. Your WinHander::idle method will be called with the token that was passed in.

Trait Implementations

impl Clone for IdleHandle[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> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.