retry

Function retry 

Source
pub async fn retry<F, T, E>(
    args: RetryArgs,
    make_fut: impl FnMut() -> F,
) -> Result<T, RetryError>
where F: Future<Output = Result<T, E>>, E: Debug,
Expand description

Keep running the future created by make_fut until the timeout or retry limit in args is reached. F must be cancel safe.