pub struct Delay { /* private fields */ }Expand description
Represents a delayed execution of a function
Implementations§
Source§impl Delay
impl Delay
Sourcepub fn spawn<F, T>(timeout: Duration, f: F) -> Self
pub fn spawn<F, T>(timeout: Duration, f: F) -> Self
Spawns a new thread that will invoke the provided function after the given timeout has been exceeded. There is no guarantee that the function will be executed exactly on the given time, only that it will be executed no earlier than until the specified duration has elapsed
Auto Trait Implementations§
impl Freeze for Delay
impl !RefUnwindSafe for Delay
impl Send for Delay
impl Sync for Delay
impl Unpin for Delay
impl UnsafeUnpin for Delay
impl !UnwindSafe for Delay
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