Function timeout_at
pub async fn timeout_at<F>(
deadline: Instant,
future: F,
) -> Result<<F as Future>::Output, Elapsed>where
F: Future,Available on crate features
runtime and time only.Expand description
Require a Future to complete before the specified instant in time.
If the future completes before the instant is reached, then the completed value is returned. Otherwise, an error is returned.