pub async fn run_with_timeout<F, T>(
duration: Duration,
future: F,
) -> Result<T, TimeoutError>where
F: Future<Output = T>,Expand description
Runs a future with a timeout.
pub async fn run_with_timeout<F, T>(
duration: Duration,
future: F,
) -> Result<T, TimeoutError>where
F: Future<Output = T>,Runs a future with a timeout.