pub async fn poll_with_timeout<Fut, R>(
name: &str,
timeout: Duration,
f: impl Fn() -> Fut,
) -> Result<R>Expand description
Retry until f succeeds or timeout is reached
- if
freturn Ok(val), this returns with Ok(val). - if
freturn Err(Control::Break(err)), this returns Err(err) - if
freturn Err(ControlFlow::Continue(err)), retries until timeout reached