pub trait Sleeper: 'static { type Sleep: Future<Output = ()>; // Required method fn sleep(&self, dur: Duration) -> Self::Sleep; }
A sleeper is used to generate a future that completes after a specified duration.
The future returned by the sleep method.
sleep
Create a future that completes after a set period.
All Fn(Duration) -> impl Future<Output = ()> implements Sleeper.
Fn(Duration) -> impl Future<Output = ()>
Sleeper