pub(crate) async fn timeout<F, T>(fut: F, timeout: Duration) -> Result<T>where F: Future<Output = Result<T>>,
Awaits a future with a provided timeout.