Trait polkadot_overseer::TimeoutExt

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

Extends Future to allow time-limited futures.

Provided Methods§

source

fn timeout(self, duration: Duration) -> Timeout<Self>
where Self: Sized,

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

Implementors§

source§

impl<F> TimeoutExt for F
where F: Future,