pub struct TraceScopeToken {
pub parent: Option<Arc<TraceScopeToken>>,
pub track: TraceNode,
pub node_index: u64,
}Expand description
A persistent linked-list token for hierarchical trace context.
Each token holds the trace info for one graph node and an Arc pointer
to its parent’s token. The full trace chain is only materialized when
explicitly requested via [recover_trace_chain()], giving us zero-cost
propagation during the flatten phase.
Fields§
§parent: Option<Arc<TraceScopeToken>>Shared pointer to the parent scope (zero-copy link).
track: TraceNodeThe trace metadata for this scope level.
node_index: u64The item_index of the PlanItem that created this scope (for debugging).
Implementations§
Source§impl TraceScopeToken
impl TraceScopeToken
Sourcepub fn recover_trace_chain(&self) -> Vec<TraceNode>
pub fn recover_trace_chain(&self) -> Vec<TraceNode>
Lazily recover the full trace chain by walking the parent pointers. Only called when an event consumer actually needs the chain.
Trait Implementations§
Source§impl Clone for TraceScopeToken
impl Clone for TraceScopeToken
Source§fn clone(&self) -> TraceScopeToken
fn clone(&self) -> TraceScopeToken
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TraceScopeToken
impl Debug for TraceScopeToken
Source§impl PartialEq for TraceScopeToken
impl PartialEq for TraceScopeToken
Source§fn eq(&self, other: &TraceScopeToken) -> bool
fn eq(&self, other: &TraceScopeToken) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TraceScopeToken
Auto Trait Implementations§
impl Freeze for TraceScopeToken
impl RefUnwindSafe for TraceScopeToken
impl Send for TraceScopeToken
impl Sync for TraceScopeToken
impl Unpin for TraceScopeToken
impl UnsafeUnpin for TraceScopeToken
impl UnwindSafe for TraceScopeToken
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more