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
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