pub trait Sleeper: 'static {
type Sleep: Future<Output = ()>;
// 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.
Required Associated Types§
Required Methods§
Implementors§
Source§impl Sleeper for TokioSleeper
Available on non-WebAssembly and crate feature tokio-sleep only.
impl Sleeper for TokioSleeper
Available on non-WebAssembly and crate feature
tokio-sleep only.