pub trait AsyncSleep: Debug + Send + Sync {
    // Required method
    fn sleep(&self, duration: Duration) -> Sleep ;
}
Expand description

Async trait with a sleep function.

Required Methods§

source

fn sleep(&self, duration: Duration) -> Sleep

Returns a future that sleeps for the given duration of time.

Implementations on Foreign Types§

source§

impl<T> AsyncSleep for Box<T>where T: AsyncSleep + ?Sized,

source§

fn sleep(&self, duration: Duration) -> Sleep

source§

impl<T> AsyncSleep for Arc<T>where T: AsyncSleep + ?Sized,

source§

fn sleep(&self, duration: Duration) -> Sleep

Implementors§