timeout

Function timeout 

Source
pub(crate) async fn timeout<F, T>(fut: F, timeout: Duration) -> Result<T>
where F: Future<Output = Result<T>>,
Expand description

Awaits a future with a provided timeout.