Skip to main content

timeout

Function timeout 

Source
pub async fn timeout<F: Future>(
    duration: Duration,
    future: F,
) -> Result<F::Output, Elapsed>
Expand description

Bound future by duration using the active platform runtime.