pub trait FutureTimeout<T>: Future<Output = T> + Sized {
// Provided method
fn timeout(self, duration: Duration) -> impl Future<Output = Option<T>> { ... }
}
Expand description
This trait adds a timeout
method to all futures.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.