Skip to main content

virtual_timeout

Function virtual_timeout 

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

Off-feature real alias for the rewriter’s virtual timeout (see virtual_sleep).

§Errors

Returns TimeoutError if the future does not complete within duration.