pub struct GateOutcome {
pub verdict: GateVerdict,
pub artefact: ArtefactRef,
pub score: Option<GateScore>,
pub rule_ids: Vec<String>,
}Expand description
What one gate evaluation produced: an authoritative verdict, the artefact behind it, and an optional confidence score.
Fields§
§verdict: GateVerdict§artefact: ArtefactRef§score: Option<GateScore>Optional gate-supplied score (KRZ-315). None for boolean-only
gates; never consulted to compute verdict.
rule_ids: Vec<String>The stable Flight Rules standards rule ids this evaluation joined
(ticket flight-rules-finding-provenance, KRZ-343; design D-H): the
linkage persisted as ruleIds on the gate’s gate.result event so
the coverage matrix can answer “which approved rules did this
mechanism evaluate” without parsing prose. Empty for every gate with
no standards linkage — boolean-only gates are byte-identical on the
wire (the event omits the empty list).
Implementations§
Source§impl GateOutcome
impl GateOutcome
Sourcepub fn pass(artefact: ArtefactRef) -> Self
pub fn pass(artefact: ArtefactRef) -> Self
A passing outcome. There is deliberately no constructor that takes a score and computes a verdict — the verdict is always stated.
Sourcepub fn fail(artefact: ArtefactRef) -> Self
pub fn fail(artefact: ArtefactRef) -> Self
A failing outcome; see GateOutcome::pass on verdicts vs scores.
Sourcepub fn with_score(self, score: f64, threshold: f64) -> Self
pub fn with_score(self, score: f64, threshold: f64) -> Self
Attach a confidence score + threshold without touching the verdict.
Sourcepub fn with_rule_ids(self, rule_ids: Vec<String>) -> Self
pub fn with_rule_ids(self, rule_ids: Vec<String>) -> Self
Name the standards rules this evaluation joined (KRZ-343) — stable rule ids, never rule prose. Like the score, the linkage is purely evidentiary: it never changes the verdict.
pub fn passed(&self) -> bool
Trait Implementations§
Source§impl Clone for GateOutcome
impl Clone for GateOutcome
Source§fn clone(&self) -> GateOutcome
fn clone(&self) -> GateOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more