timeout

Function timeout 

Source
pub async fn timeout<F, T>(_: Duration, _f: F) -> Result<T, TimeoutError>
where F: Future<Output = T>,