Skip to main content

timeout

Function timeout 

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

Platform-agnostic timeout. Send-safe on all platforms.