Function retry

Source
async fn retry<F, T, E>(
    retry_delay: Duration,
    max_duration: Duration,
    operation_name: &str,
    operation: F,
) -> T
where F: FnMut() -> BoxFuture<'static, Result<T, E>>, E: Display,