pub struct IdleHandle(/* private fields */);
Expand description
A handle that can enqueue tasks on the window loop.
Implementations§
Source§impl IdleHandle
impl IdleHandle
Sourcepub fn add_idle<F>(&self, callback: F)
pub fn add_idle<F>(&self, callback: F)
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.
Sourcepub fn schedule_idle(&mut self, token: IdleToken)
pub fn schedule_idle(&mut self, token: IdleToken)
Request a callback from the runloop. Your WinHander::idle
method will
be called with the token
that was passed in.
Trait Implementations§
Source§impl Clone for IdleHandle
impl Clone for IdleHandle
Source§fn clone(&self) -> IdleHandle
fn clone(&self) -> IdleHandle
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for IdleHandle
impl RefUnwindSafe for IdleHandle
impl Send for IdleHandle
impl Sync for IdleHandle
impl Unpin for IdleHandle
impl UnwindSafe for IdleHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.