timeout

Function timeout 

Source
pub async fn timeout<T>(
    duration: Duration,
    fut: impl Future<Output = T>,
) -> Result<T, ()>