Trait Sleeper
Source pub trait Sleeper: 'static {
type Sleep: Future;
// Required method
fn sleep(&self, dur: Duration) -> Self::Sleep;
}
Expand description
A sleeper is used to generate a future that completes after a specified duration.
The future returned by the sleep method.
Create a future that completes after a set period.
Source§Available on non-WebAssembly and crate feature tokio-sleep only.
Source§All Fn(Duration) -> impl Future implements Sleeper.