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§
Sourcefn with_timeout(
self,
timeout: Duration,
executor: &BackgroundExecutor,
) -> WithTimeout<Self>where
Self: Sized,
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.