Skip to main content

timeout

Function timeout 

Source
pub async fn timeout<T: Future<Output = O>, O>(
    duration: Duration,
    future: T,
) -> Result<O, TimedOut>
Expand description

Timeout the provided future for the specified duration.