pub trait ExtExt<T>{
// Required methods
fn until<A, B, F>(self, f: F) -> Select<A, B> ⓘ
where Self: Sized,
F: FnOnce() -> B,
A: Future<Output = T> + From<Self> + Send + Unpin,
B: Future<Output = ()> + Send + Unpin;
fn timed(self) -> impl Future<Output = (T, Duration)> + Send
where Self: Sized;
}Expand description
Adds a stop-future race and a completion timer to ordinary futures.
until hands back a selector over the receiver and a stopping future;
timed hands back the receiver’s output with how long it took.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".