#[non_exhaustive]pub struct Check {
pub code: CheckCode,
pub column: Option<String>,
pub dimension: Option<QualityDimension>,
pub expected: Expectation,
pub observed: Option<MetricValue>,
pub scope: PolicyScope,
pub evidence: Evidence,
pub bounds: Option<CheckBounds>,
pub baseline: Option<BaselineReading>,
pub status: CheckStatus,
pub message: String,
}Expand description
One requirement and what the report said about it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: CheckCodeWhich requirement this is.
column: Option<String>The column it concerns, when it concerns one.
dimension: Option<QualityDimension>The quality dimension it concerns, when it concerns one.
expected: ExpectationThe constraint applied.
observed: Option<MetricValue>The value read from the report. Absent when nothing was read: every
unevaluated check, and every require_metric check.
scope: PolicyScopeWhat the requirement is a statement about.
evidence: EvidenceWhether the data behind observed covers the whole source.
bounds: Option<CheckBounds>Where the whole-source value lies, when observed came from a retained
sample and the report bounds it. A full-source requirement is decided
on this interval rather than on observed: it passes when the whole
interval meets the requirement, fails when none of it does, and is
otherwise not evaluated.
baseline: Option<BaselineReading>The baseline’s side of a rule about change. Absent on every other rule.
status: CheckStatusPassed, failed, or not evaluated.
message: StringA fixed sentence naming the outcome.
Deliberately free of numbers: observed and expected carry those, so
the prose is identical wherever a value would have been formatted and
the Rust and Python implementations cannot drift on rounding inside a
string.
Implementations§
Source§impl Check
impl Check
Sourcepub fn is_violation(&self) -> bool
pub fn is_violation(&self) -> bool
True when the check was evaluated and violated.
Sourcepub fn not_evaluated(&self) -> Option<&NotEvaluated>
pub fn not_evaluated(&self) -> Option<&NotEvaluated>
Why the check was not evaluated, if it was not.