Skip to main content

timeout_future

Function timeout_future 

Source
pub async fn timeout_future<F, T>(
    ctx: &Context,
    future: F,
) -> Result<T, TimeoutError>
where F: Future<Output = T>,
Expand description

Executes future bounded by the RequestDeadline attached to ctx.

If no deadline is attached to ctx, future runs without an extra timeout wrapper.

§Arguments

  • &Context - Active Hyperlane request context.
  • F - Async operation to bound.

§Returns