pub fn retry<R, S>(task: R, scheduler: S) -> Retry<R>
where
    R: Retryable,
    R::Error: std::fmt::Debug,
    S: Backoff + 'static,
{
    Retry {
        retryable: task,
        scheduler: Box::new(scheduler),
        state: RetryState::Pending,
        trying_fut: None,
        waiting_fut: None,
    }
}
/// Retry a future until it succeeds.
Retry a future until it succeeds.
Retry a future until it succeeds .
pub fn retry<R, S>(task: R, scheduler: S) -> Retry<R>
where
    R: Retryable,
    R::Error: std::fmt::Debug,
    S: Backoff + 'static,
{
    Retry {
        retryable: task,
        scheduler: Box::new(scheduler),
        state: RetryState::Pending,
        trying_fut: None,
        waiting_fut: None,
    }
}
pub fn retry < R , S > ( task : R , scheduler : S ) -> Retry < R > where R : Retryable , R :: Error : std :: fmt :: Debug , S : Backoff + ' static , { Retry { retryable : task , scheduler : Box :: new ( scheduler ) , state : RetryState :: Pending , trying_fut : None , waiting_fut : None , } }
Retry a future until it succeeds.
Retry a future until it succeeds .
task
R
scheduler
S
task
R
scheduler
S