pub async fn with_timeout<F, T, E>(
timeout_ms: u32,
fut: F,
) -> Result<T, WithTimeoutError<E>>Expand description
Re-export the edge-nal crate
Run a fallible future with a timeout.
A future is a fallible future if it resolves to a Result<T, E>.
If the future completes before the timeout, its output is returned. Otherwise, on timeout, a timeout error is returned.
Parameters:
timeout_ms: The timeout duration in millisecondsfut: The future to run