pub async fn run_with_timeout<F, T>(
name: impl Into<String>,
timeout: Duration,
fut: F,
) -> CheckResultwhere
F: Future<Output = T>,Expand description
Run a future with a hard timeout. Produces a CheckResult.
If the future completes before the timeout, the verdict is Pass
and the duration is recorded.
If the future does not complete in time, the verdict is Fail with
severity Error. The future itself is dropped (cancelled) when the
timeout expires.