[go: up one dir, main page]

retry_with_backoff

Function retry_with_backoff 

Source
pub async fn retry_with_backoff<F, Fut, T, E>(
    max_attempts: u32,
    initial_delay: Duration,
    f: F,
) -> Result<T, E>
where F: Fn() -> Fut, Fut: Future<Output = Result<T, E>>, E: Debug,
Expand description

Retries a function with exponential backoff.