pub trait TimeoutExt: Future {
    fn timeout(self, duration: Duration) -> Timeout<Self> 
    where
        Self: Sized
, { ... } }
Expand description

Extends Future to allow time-limited futures.

Provided Methods§

Adds a timeout of duration to the given Future. Returns a new Future.

Implementors§