Function twizzler_async::timeout_at

source ·
pub async fn timeout_at<F: Future>(f: F, at: Instant) -> Option<F::Output>
Expand description

Await a future until a timeout occurs (or that future completes). If the timeout happens, return None, otherwise return Some of the result of the future. This timeout expires at an instant in time.