pub trait BlockingSleeper: 'static {
// Required method
fn sleep(&self, dur: Duration);
}Expand description
A sleeper is used sleep for a specified duration.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl BlockingSleeper for StdSleeper
Available on crate feature
std-blocking-sleep only.impl<F: Fn(Duration) + 'static> BlockingSleeper for F
All Fn(Duration) implements Sleeper.