pub fn wait_for<F, T, E>(
timeout: Duration,
interval: Duration,
op: F,
) -> Result<Option<T>, E>Expand description
Wait until an operation yields a result or a timeout is reached,
polling every interval.
On success the function returns Ok(Some(T)). When timeout is
exceeded without a result being produced the return value is
Ok(None). Errors reported by the operation in question result in
early return with Err(E).