pub trait TimeoutFutureExt{
// Required methods
fn timeout_when<D>(
self,
when: D,
) -> impl Future<Output = Result<Self::Output, TimeoutError>>
where D: Future;
fn timeout(
self,
delay: Duration,
) -> impl Future<Output = Result<Self::Output, TimeoutError>>;
}Required Methods§
fn timeout_when<D>(
self,
when: D,
) -> impl Future<Output = Result<Self::Output, TimeoutError>>where
D: Future,
fn timeout( self, delay: Duration, ) -> impl Future<Output = Result<Self::Output, TimeoutError>>
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.