pub trait TimeoutExt: Future + Sized {
// Provided method
fn on_timeout<T, OT>(
self,
timer: T,
on_timeout: OT,
) -> OnTimeout<Self, T, OT> ⓘ
where T: Future<Output = ()> + 'static,
OT: FnOnce() -> Self::Output { ... }
}Expand description
A wrapper for a future which will complete with a provided closure when a timeout occurs. This
is forked from fuchsia_async::OnTimeout because that has a fixed dependency on
fuchsia_async::Timer which driver dispatcher does not support.
Provided Methods§
fn on_timeout<T, OT>(self, timer: T, on_timeout: OT) -> OnTimeout<Self, T, OT> ⓘ
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.