pub trait TimeoutExt: Future { fn timeout(self, duration: Duration) -> Timeout<Self>ⓘNotable traits for Timeout<F>impl<F> Future for Timeout<F> where F: Future, type Output = Option<<F as Future>::Output>; { ... } }
impl<F> Future for Timeout<F> where F: Future, type Output = Option<<F as Future>::Output>;
Extends Future to allow time-limited futures.
Future
Adds a timeout of duration to the given Future. Returns a new Future.
duration