timeout

Function timeout 

Source
pub async fn timeout<F, T>(duration: Duration, future: F) -> Result<T, Error>
where F: Future<Output = T>,