Function timeout

Source
pub fn timeout<F>(duration: Duration, future: F) -> Timeout<F::IntoFuture>
where F: IntoFuture,