Skip to main content

trace_causality

Function trace_causality 

Source
pub async fn trace_causality(
    engine: &MnemoEngine,
    event_id: Uuid,
    max_depth: usize,
    direction: TraceDirection,
    event_type_filter: Option<EventType>,
) -> Result<CausalChain>
Expand description

Trace a causal chain starting from a root event.

  • direction: controls whether to walk upward (ancestors), downward (descendants), or both.
  • event_type_filter: when Some, only events matching the given EventType are included in the returned nodes. However, traversal still proceeds through non-matching events to preserve connectivity (i.e., filtering is applied to output, not to graph exploration).