Skip to main content

run_with_timeout

Function run_with_timeout 

Source
pub async fn run_with_timeout<F, T>(
    duration: Duration,
    future: F,
) -> Result<T, TimeoutError>
where F: Future<Output = T>,
Expand description

Runs a future with a timeout.