pub struct ClauseTrace {
pub label: String,
pub result: bool,
pub children: Vec<ClauseTrace>,
}Expand description
Tree-shaped trace from one debug evaluation against a single
EvalContext. Mirrors the AST of the predicate that was
evaluated, except And / Or short-circuits drop unevaluated
siblings — the trace only carries clauses that actually ran.
Phase 6 of CAPABILITY_ENHANCEMENTS_PLAN.md. Returned by
Predicate::evaluate_with_trace.
Fields§
§label: StringOne-line summary of the clause ("Exists(hardware.gpu)",
"And(3 clauses)", "MetadataEquals(intent=ml-training)").
Aggregated stats merge by label, so two structurally-equal
leaf clauses share one entry in the report.
result: boolFinal result of evaluating this clause.
children: Vec<ClauseTrace>Children traces in evaluation order. For And / Or this is
the planner-ordered (cost-ascending) sequence of children
that actually ran (short-circuited siblings are absent).
Not has exactly one child. Leaves have an empty children
list.
Trait Implementations§
Source§impl Clone for ClauseTrace
impl Clone for ClauseTrace
Source§fn clone(&self) -> ClauseTrace
fn clone(&self) -> ClauseTrace
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClauseTrace
impl Debug for ClauseTrace
Source§impl PartialEq for ClauseTrace
impl PartialEq for ClauseTrace
Source§fn eq(&self, other: &ClauseTrace) -> bool
fn eq(&self, other: &ClauseTrace) -> bool
self and other values to be equal, and is used by ==.