pub struct ValidationReport {
pub violations_by_rule: BTreeMap<String, Vec<Violation>>,
}Expand description
Aggregated result of running the full rule pipeline.
Fields§
§violations_by_rule: BTreeMap<String, Vec<Violation>>Violations grouped by rule ID, sorted canonically by rule ID.
Implementations§
Source§impl ValidationReport
impl ValidationReport
Sourcepub fn add(&mut self, rule_id: &str, violations: Vec<Violation>)
pub fn add(&mut self, rule_id: &str, violations: Vec<Violation>)
Add violations for a given rule to the report.
Sourcepub fn error_count(&self) -> usize
pub fn error_count(&self) -> usize
Total number of violations at Severity::Error across all rules.
Sourcepub fn warning_count(&self) -> usize
pub fn warning_count(&self) -> usize
Total number of violations at Severity::Warning across all rules.
Trait Implementations§
Source§impl Default for ValidationReport
impl Default for ValidationReport
Source§fn default() -> ValidationReport
fn default() -> ValidationReport
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ValidationReport
impl RefUnwindSafe for ValidationReport
impl Send for ValidationReport
impl Sync for ValidationReport
impl Unpin for ValidationReport
impl UnsafeUnpin for ValidationReport
impl UnwindSafe for ValidationReport
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