Expand description
Per-request context and hook data bridge for storage hooks.
Uses tokio task-local storage so that per-request data (e.g. tenant ID, conversation store ID from HTTP headers) can reach hooks without threading it through every storage method signature.
Also provides a task-local ExtraColumns bridge so that hooked storage
wrappers can pass hook-provided extra column values to backends without
changing any storage trait signatures.
Structs§
- Request
Context - Per-request context passed to storage hooks.
Functions§
- current_
extra_ columns - Read the current hook extra columns, if set for this task.
- current_
request_ context - Read the current request context, if one is set for this task.
- with_
extra_ columns - Run an async block with the given
ExtraColumnsavailable via task-local. - with_
request_ context - Run an async block with the given
RequestContextavailable via task-local.