Skip to main content

with_request_context

Function with_request_context 

Source
pub async fn with_request_context<F, T>(ctx: RequestContext, f: F) -> T
where F: Future<Output = T>,
Expand description

Run an async block with the given RequestContext available via task-local.

Called by the gateway HTTP handler before invoking storage operations. The context is available inside f via current_request_context.