pub async fn with_retries<T, E, F, Fut>(
attempts: u32,
delay: Duration,
label: &str,
operation: F,
) -> Result<T, E>Expand description
Run an async operation, retrying on error up to attempts times, delay apart.
Each failure is reported; the last error is returned once attempts are exhausted.