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