retry_with_backoff

Function retry_with_backoff 

Source
pub async fn retry_with_backoff<T, E, Fut, F>(
    fut: F,
    max_retry: usize,
    init_backoff: Duration,
) -> Result<T, E>
where F: FnMut() -> Fut, Fut: Future<Output = Result<T, E>>,
Expand description

Retry to execute the function until success or the maximum number of retries is reached.