pub struct Report { /* private fields */ }Expand description
Everything a validation run produced.
Implementations§
Source§impl Report
impl Report
Sourcepub fn push(&mut self, finding: Finding)
pub fn push(&mut self, finding: Finding)
Records a finding, or marks the report truncated when its cap is full.
Sourcepub fn mark_truncated(&mut self)
pub fn mark_truncated(&mut self)
Records that the run stopped early because it hit its finding budget.
A report that silently stops at N findings claims the file has N problems. This flag is what keeps that claim honest.
Sourcepub const fn is_truncated(&self) -> bool
pub const fn is_truncated(&self) -> bool
Whether the run stopped before checking everything.
Sourcepub fn findings(&self) -> &[Finding]
pub fn findings(&self) -> &[Finding]
Every finding, in the order produced.
Callers wanting a stable order across runs should use
Report::sorted: production order follows traversal, which is
deterministic for a given model but not meaningful.
Sourcepub fn sorted(&self) -> Vec<&Finding>
pub fn sorted(&self) -> Vec<&Finding>
Findings in a stable, explicitly defined order.
Sorted by severity, then rule id, then entity id, then slot. Two runs over the same file always produce byte-identical output, which is what makes a report diffable in CI.
Sourcepub fn extend(&mut self, other: Self)
pub fn extend(&mut self, other: Self)
Merges another report into this one, preserving the truncation flag.
Sourcepub fn is_conformant(&self) -> bool
pub fn is_conformant(&self) -> bool
Whether anything this validator checked was violated.