Skip to main content

retry_loop

Function retry_loop 

Source
async fn retry_loop<G, GFut, F, Fut, T, E, A>(
    cfg: &RetryCfg,
    deadline: Option<Instant>,
    gate: G,
    op: F,
) -> GatedOutcome<T, E, A>
where G: FnMut() -> GFut, GFut: Future<Output = Result<(), A>>, F: FnMut() -> Fut, Fut: Future<Output = Result<T, (Retry, E)>>,
Expand description

The shared retry loop: gate before each try, then op, sleeping between transient failures.