Module context
Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
Task, thread, and distributed request context propagation. Opaque scope ownership and propagation across tasks and threads.
Structs
- PropagationContext: Versioned, transport-neutral causal context for crossing a Relay boundary.
- ScopeStackEntry: Identity of one entry in the visible Relay scope stack.
- ScopeStackHandle: A shared scope-stack identity, without access to the runtime’s locks or registries.
- ScopeStackSnapshot: Owned root-to-top values from one coherent read of a visible scope stack.
- ThreadScopeStackBinding: A captured thread binding, including its active managed-event context.
Functions
- capture_propagation_context: Capture the current causal parent and its Relay root when available.
- capture_propagation_context_with_root: Capture the current causal parent and an application-supplied session root. Without an imported W3C parent, the supplied root determines the receiver’s trace. An imported W3C parent retains precedence over the Relay root. Passing
Nonehas the same behavior ascapture_rootless_propagation_context. - capture_rootless_propagation_context: Capture the current causal parent without a root UUID.
- capture_thread_scope_stack: Capture the current thread binding for later restoration.
- capture_traceparent: Capture the current canonical W3C
traceparentvalue. - create_scope_stack: Create an independent stack containing one implicit root scope.
- create_scope_stack_from_propagation: Create an independent stack below a transported causal parent.
- current_scope_stack_snapshot: Return detached identities from the calling context’s explicitly active stack.
- fork_scope_stack: Create an independent child stack below the current causal parent.
- propagate_scope_to_thread: Capture the active stack for propagation to another thread.
- restore_thread_scope_stack: Restore a captured thread binding and its managed-event context.
- set_thread_scope_stack: Install a stack on the current thread.
- snapshot_scope_stack: Copy a stack into an isolated emission-time snapshot.
- with_scope_stack: Run synchronous work with a stack, restoring the previous binding afterward.
- with_task_scope_stack: Run a future with a stack bound across executor thread switches.