Skip to main content

timeout

Function timeout 

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

Requires a Future to complete before the specified duration has elapsed.