#[non_exhaustive]pub struct Finding {
pub check_id: &'static str,
pub severity: Severity,
pub clip: Option<String>,
pub bone: Option<String>,
pub time_s: Option<f32>,
pub measured: Option<Value>,
pub expected: Option<Value>,
pub message: String,
pub diagnostic: bool,
}Expand description
A structured lint result emitted by a crate::Check.
The JSON shape is part of animsmith’s automation contract. The Rust
struct is marked non_exhaustive so new optional context fields can
be added before 1.0 without forcing downstream construction through
struct literals.
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.check_id: &'static strStable check id such as "loop-seam".
severity: SeverityEffective severity after any non-diagnostic override.
clip: Option<String>Clip associated with the finding, when the finding is clip-local.
bone: Option<String>Bone associated with the finding, when applicable.
time_s: Option<f32>Time in seconds associated with the finding, when applicable.
measured: Option<Value>Measured value that triggered the finding.
expected: Option<Value>Expected value or threshold for the finding.
message: StringHuman-readable explanation.
diagnostic: boolA diagnostic (a “skipped: …” note about an unmet prerequisite),
not a judgement of the content. Diagnostics are exempt from
per-check severity overrides — a check declared severity = "error" must never turn a “roles unresolved” note into a false
failure. Not serialized: the JSON output shape is unchanged.
Implementations§
Source§impl Finding
impl Finding
Sourcepub fn new(
check_id: &'static str,
severity: Severity,
message: impl Into<String>,
) -> Self
pub fn new( check_id: &'static str, severity: Severity, message: impl Into<String>, ) -> Self
Construct a finding with no optional context fields set.
Sourcepub fn as_diagnostic(self) -> Self
pub fn as_diagnostic(self) -> Self
Mark this finding a diagnostic (see Finding::diagnostic):
emitted at Note, exempt from severity overrides.