Function fractal::utils::timeout_future

source ·
pub async fn timeout_future<T>(
    timeout: Duration,
    fut: impl Future<Output = T>
) -> Result<T, TimeoutFuture>
Expand description

Executes the given future with the given timeout.

If the future didn’t resolve before the timeout was reached, this returns an Err(TimeoutFuture).