[−][src]Struct over_there_utils::Delay
Represents a delayed execution of a function
Methods
impl Delay
[src]
pub fn spawn<F, T>(timeout: Duration, f: F) -> Self where
F: FnOnce() -> T + Send + 'static,
[src]
F: FnOnce() -> T + Send + 'static,
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
pub fn cancel(&self)
[src]
Cancels the delayed execution, if it has not yet occurred
Auto Trait Implementations
impl !RefUnwindSafe for Delay
impl Send for Delay
impl Sync for Delay
impl Unpin for Delay
impl !UnwindSafe for Delay
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,