pub fn timeout_checked<T, U>(dur: U, future: T) -> TimeoutChecked<T>
Notable traits for TimeoutChecked<T>
impl<T> Future for TimeoutChecked<T> where
    T: Future
type Output = Result<T::Output, ()>;
where
    T: Future,
    U: Into<Millis>, 
Expand description

Require a Future to complete before the specified duration has elapsed.

If the future completes before the duration has elapsed, then the completed value is returned. Otherwise, an error is returned and the future is canceled. If duration value is zero then timeout is disabled.