[][src]Function waitfor::wait_until

pub fn wait_until<F, T, E>(
    deadline: Instant,
    interval: Duration,
    op: F
) -> Result<Option<T>, E> where
    F: FnMut() -> Result<Option<T>, E>, 

Wait until an operation yields a result or a deadline is reached, polling every interval. On success the function returns Ok(Some(T)). When deadline is reached 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).