pub async fn retry<T, E, F, Fut>(
op: F,
max_attempts: u32,
schedule: RetrySchedule,
) -> Result<T, E>Expand description
Run op, retrying up to max_attempts total times (including the
initial call). Returns the last error if every attempt fails.
max_attempts == 1 means “no retries” — op runs exactly once.