pub struct DelayExecutor { /* private fields */ }Expand description
Executor that starts each task after a fixed delay.
DelayExecutor models delayed start, not minimum execution duration. The
returned TaskHandle is created immediately. A helper thread sleeps for
the configured delay and then runs the task. Dropping the handle does not
cancel the helper thread.
Implementations§
Trait Implementations§
Source§impl Clone for DelayExecutor
impl Clone for DelayExecutor
Source§fn clone(&self) -> DelayExecutor
fn clone(&self) -> DelayExecutor
Returns a duplicate 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 moreSource§impl Debug for DelayExecutor
impl Debug for DelayExecutor
Source§impl Executor for DelayExecutor
impl Executor for DelayExecutor
Source§fn call<C, R, E>(&self, task: C) -> Self::Execution<R, E>
fn call<C, R, E>(&self, task: C) -> Self::Execution<R, E>
Starts a helper thread that waits and then runs the callable.
§Parameters
task- Callable to run after the configured delay.
§Returns
A TaskHandle for the delayed task.
Source§impl PartialEq for DelayExecutor
impl PartialEq for DelayExecutor
impl Copy for DelayExecutor
impl Eq for DelayExecutor
impl StructuralPartialEq for DelayExecutor
Auto Trait Implementations§
impl Freeze for DelayExecutor
impl RefUnwindSafe for DelayExecutor
impl Send for DelayExecutor
impl Sync for DelayExecutor
impl Unpin for DelayExecutor
impl UnsafeUnpin for DelayExecutor
impl UnwindSafe for DelayExecutor
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