Trait TimeoutFutureExt

Source
pub trait TimeoutFutureExt
where Self: Sized + Future,
{ // 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§

Source

fn timeout_when<D>( self, when: D, ) -> impl Future<Output = Result<Self::Output, TimeoutError>>
where D: Future,

Source

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.

Implementors§

Source§

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