FutureExt

Trait FutureExt 

Source
pub trait FutureExt {
    // Required method
    fn with_timeout(
        self,
        timeout: Duration,
        executor: &BackgroundExecutor,
    ) -> WithTimeout<Self>
       where Self: Sized;
}
Expand description

Extensions for Future types that provide additional combinators and utilities.

Required Methods§

Source

fn with_timeout( self, timeout: Duration, executor: &BackgroundExecutor, ) -> WithTimeout<Self>
where Self: Sized,

Requires a Future to complete before the specified duration has elapsed. Similar to tokio::timeout.

Implementors§

Source§

impl<T: Future> FutureExt for T