[][src]Struct over_there_utils::Delay

pub struct Delay { /* fields omitted */ }

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]

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]

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

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

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

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

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.