Skip to main content

TimeoutFutureExt

Trait TimeoutFutureExt 

Source
pub trait TimeoutFutureExt: Future + Sized {
    // Provided method
    fn timeout(self, duration: Duration) -> Timeout<Self>  { ... }
}

Provided Methods§

Source

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

Requires a Future to complete before the specific duration has elapsed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> TimeoutFutureExt for T
where T: Future,