Expand description
Per-request correlation context.
CorrelationContext carries request-scoped state — correlation and request IDs,
flow marker, user ID, raw body, headers, query parameters, decoded multipart
payload, arbitrary key/value data, and pagination state — through handlers.
It is cheaply clonable via Arc and can also be propagated via the
CORRELATION_CTX task-local.
ⓘ
let ctx = CorrelationContext::new();
let page: Option<String> = ctx.query_param("page");Structs§
- Correlation
Context - Per-request correlation context. Cheaply clonable via
Arc. Shares the underlying request state; mutating one clone is visible to the others.
Enums§
- Correlation
Flow - Lifecycle marker for a correlated unit of work.
Statics§
- CORRELATION_
CTX - Task-local
CorrelationContextfor the current async task, when set by the dispatcher.