[][src]Struct druid_shell::windows::IdleHandle

pub struct IdleHandle { /* fields omitted */ }

A handle that can get used to schedule an idle handler. Note that this handle is thread safe. If the handle is used after the hwnd has been destroyed, probably not much will go wrong (the XI_RUN_IDLE message may be sent to a stray window).

Methods

impl IdleHandle[src]

pub fn add_idle<F>(&self, callback: F) where
    F: FnOnce(&mut 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 window's wndproc, which means it won't be scheduled if the window is closed.

Trait Implementations

impl Send for IdleHandle[src]

impl Clone for IdleHandle[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for T[src]

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.

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

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

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

impl<T> RoundFrom<T> for T

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