pub fn timeout<F>(duration: Duration, future: F) -> Timeout<F::IntoFuture> ⓘwhere
F: IntoFuture,Available on crate feature
process-node only.Expand description
Apply a timeout to the given future
If future completes before duration has elapsed, then the completed value is returned.
Otherwise, an Elapsed error is returned and the future is cancelled.