#[non_exhaustive]pub struct Finding {
pub check_id: &'static str,
pub severity: Severity,
pub clip: Option<String>,
pub bone: Option<String>,
pub node: Option<String>,
pub time_s: Option<f32>,
pub measured: Option<Value>,
pub expected: Option<Value>,
pub members: Option<Vec<MemberMeasurement>>,
pub message: String,
}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 per-check 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.
node: Option<String>Stable source-node path associated with the finding, when applicable. Path components carry source indices so repeated display names remain distinguishable.
time_s: Option<f32>Finite time in seconds associated with the finding, when applicable. Non-finite values are omitted from serialized output.
measured: Option<Value>Measured value that triggered the finding. Non-finite numeric values are omitted from serialized output.
expected: Option<Value>Expected value or threshold for the finding. Non-finite numeric values are omitted from serialized output.
members: Option<Vec<MemberMeasurement>>Per-member evidence for a group-level finding, in configured order.
message: StringHuman-readable explanation.
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 members(self, members: Vec<MemberMeasurement>) -> Self
pub fn members(self, members: Vec<MemberMeasurement>) -> Self
Attach a configured-order group member table.
Any non-finite numeric values supplied through a directly constructed row are removed before serialization, matching scalar finding values.