usecore::future::Future;usestd::time::Duration;usecrate::future::Timeout;/// Extend `Future` with time-based operations.
pubtraitFutureExt: Future {/// Await a stream or times out after a duration of time.
fntimeout(self, dur: Duration)->Timeout<Self>whereSelf: Sized,
{Timeout::new(self, dur)}}impl<T> FutureExt forTwhere T: Future {}