pub fn timeout<T>( duration: Duration, future: T, ) -> impl Future<Output = Result<T::Output, TimeoutError>>where T: Future,