pub async fn with_timeout<F: Future>( fut: F, timeout: impl Future<Output = ()>, ) -> Option<F::Output>
Run fut until it completes or timeout elapses first.
fut
timeout
Returns None when timeout won the race.
None