pub async fn timeout<T: Future<Output = O>, O>( duration: Duration, future: T, ) -> Result<O, TimedOut>
Timeout the provided future for the specified duration.