pub trait Sleeper: 'static { type Sleep: Future; // Required method fn sleep(&self, dur: Duration) -> Self::Sleep; }
导出 backon 实现失败重试 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.
tokio-sleep
All Fn(Duration) -> impl Future implements Sleeper.
Fn(Duration) -> impl Future
Sleeper