timeout

Function timeout 

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