Skip to main content

timeout_checked

Function timeout_checked 

Source
pub fn timeout_checked<T, U>(dur: U, future: T) -> TimeoutChecked<T> 
where T: Future, U: Into<Millis>,
Expand description

Requires a future to complete before dur 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. A zero duration disables the timeout.