Skip to main content

BlockingSleeper

Trait BlockingSleeper 

Source
pub trait BlockingSleeper: 'static {
    // Required method
    fn sleep(&self, dur: Duration);
}
Expand description

导出 backon 实现失败重试 A sleeper is used sleep for a specified duration.

Required Methods§

Source

fn sleep(&self, dur: Duration)

sleep for a specified duration.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl BlockingSleeper for StdSleeper

Available on crate feature std-blocking-sleep only.
Source§

impl<F> BlockingSleeper for F
where F: Fn(Duration) + 'static,

All Fn(Duration) implements Sleeper.