Function retry

Source
pub async fn retry<T>(task: T) -> Result<T::Item, T::Error>
where T: Task,
Expand description

Retries a fallible Future with a default RetryPolicy

again::retry(|| async { Ok::<u32, ()>(42) });