pub struct GateResult {
pub verdict: Verdict,
pub scope: PolicyScope,
pub evidence: Evidence,
pub checks: Vec<Check>,
}Expand description
The structured result of evaluating a QualityPolicy.
Fields§
§verdict: VerdictThe overall outcome.
scope: PolicyScopeThe scope every requirement was evaluated under.
evidence: EvidenceWhether the scan itself covered the whole source. A single check’s evidence can be weaker still, when its metric came from a retained sample of the scanned rows.
checks: Vec<Check>Every requirement, in evaluation order.
Implementations§
Source§impl GateResult
impl GateResult
Sourcepub fn passed(&self) -> bool
pub fn passed(&self) -> bool
True only for Verdict::Pass.
An inconclusive result is not a pass: reading it as one is the mistake
this API exists to prevent. Callers that need to tell “violated” from
“could not tell” should match on GateResult::verdict.
Sourcepub fn violations(&self) -> impl Iterator<Item = &Check>
pub fn violations(&self) -> impl Iterator<Item = &Check>
The checks that were evaluated and violated.
Sourcepub fn unevaluated(&self) -> impl Iterator<Item = &Check>
pub fn unevaluated(&self) -> impl Iterator<Item = &Check>
The checks that could not be evaluated.
Trait Implementations§
Source§impl Clone for GateResult
impl Clone for GateResult
Source§impl Debug for GateResult
impl Debug for GateResult
Source§impl PartialEq for GateResult
impl PartialEq for GateResult
Source§impl Serialize for GateResult
impl Serialize for GateResult
impl StructuralPartialEq for GateResult
Auto Trait Implementations§
impl Freeze for GateResult
impl RefUnwindSafe for GateResult
impl Send for GateResult
impl Sync for GateResult
impl Unpin for GateResult
impl UnsafeUnpin for GateResult
impl UnwindSafe for GateResult
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