Module scope_stack
Module scope_stack
Generated from cargo doc --no-deps -p nemo-relay -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.
Scope stack storage and propagation helpers.
The runtime tracks the current scope hierarchy through a shared ScopeStack stored in task-local or thread-local state. Advanced callers can use this module to inspect the active scope chain or propagate scope context into worker threads.
Structs
- PropagationContext: Versioned, transport-neutral causal context for crossing a Relay boundary.
- ScopeStack: Mutable stack of active scopes plus their scope-local registries.
- ThreadScopeStackBinding: Captured thread-local scope stack binding.
Statics
- TASK_SCOPE_STACK: Task-local scope stack handle used by async execution contexts.
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-local scope stack binding.
- capture_traceparent: Capture the current canonical W3C
traceparentvalue. - create_scope_stack: Create a new scope stack handle with an implicit root scope.
- create_scope_stack_from_propagation: Create an isolated scope stack rooted below a supplied propagation context.
- current_scope_stack: Return the scope stack visible to the current execution context.
- fork_scope_stack: Create an isolated scope stack below the current causal parent.
- propagate_scope_to_thread: Capture the current scope stack handle for use in another thread.
- restore_thread_scope_stack: Restore a previously captured thread-local scope stack binding.
- scope_stack_active: Report whether the current context has an explicitly active scope stack.
- set_thread_scope_stack: Install an explicit scope stack for the current thread.
- sync_thread_scope_stack: Synchronize the thread-local scope stack without marking it explicit.
- task_scope_push: Push a scope handle onto the active stack.
- task_scope_remove: Remove a scope handle from the active stack.
- task_scope_top: Clone the current top-most scope handle from the active stack.
- with_active_event_uuid: Run a future with
uuidas the causally active managed event. - with_scope_stack: Run a synchronous callback with
handleas the visible scope stack.
Type Aliases
- ScopeStackHandle: Shared handle type for the runtime scope stack.