pub trait TimeoutExt: Future { // Provided method fn timeout(self, duration: Duration) -> Timeout<Self> ⓘ where Self: Sized { ... } }
Extends Future to allow time-limited futures.
Future
Adds a timeout of duration to the given Future. Returns a new Future.
duration