Skip to main content

with_request_execution_async

Function with_request_execution_async 

Source
pub fn with_request_execution_async<'a, T>(
    future: impl Future<Output = T> + 'a,
) -> RequestExecutionFuture<'a, T> ⓘ
Expand description

Run one async entry point under a single aggregate request budget.

The same root is installed immediately before each poll and removed immediately afterward. Zero-argument db!() therefore works before and after .await without leaving request state ambient while the future is suspended. Nested wrappers reuse the already-active root.

§Panics

Panics as an internal integration invariant if a future that has already started under one request is later polled beneath a different active request root. Ordinary endpoint executors do not move pending futures between request invocations.