pub struct ValidationReport {
pub violations: Vec<Violation>,
pub summary: ValidationSummary,
pub config_fingerprint: Option<String>,
}Expand description
Complete validation report containing all violations and metadata
Fields§
§violations: Vec<Violation>All violations found during validation
summary: ValidationSummarySummary statistics
config_fingerprint: Option<String>Configuration used for this validation
Implementations§
Source§impl ValidationReport
impl ValidationReport
Sourcepub fn add_violation(&mut self, violation: Violation)
pub fn add_violation(&mut self, violation: Violation)
Add a violation to the report
Sourcepub fn has_violations(&self) -> bool
pub fn has_violations(&self) -> bool
Whether the report contains any violations
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Whether the report contains blocking violations (errors)
Sourcepub fn violations_by_severity(
&self,
severity: Severity,
) -> impl Iterator<Item = &Violation>
pub fn violations_by_severity( &self, severity: Severity, ) -> impl Iterator<Item = &Violation>
Get violations of a specific severity
Sourcepub fn set_files_analyzed(&mut self, count: usize)
pub fn set_files_analyzed(&mut self, count: usize)
Set the number of files analyzed
Sourcepub fn set_execution_time(&mut self, duration_ms: u64)
pub fn set_execution_time(&mut self, duration_ms: u64)
Set the execution time
Sourcepub fn set_config_fingerprint(&mut self, fingerprint: impl Into<String>)
pub fn set_config_fingerprint(&mut self, fingerprint: impl Into<String>)
Set the configuration fingerprint
Sourcepub fn merge(&mut self, other: ValidationReport)
pub fn merge(&mut self, other: ValidationReport)
Merge another report into this one
Sourcepub fn sort_violations(&mut self)
pub fn sort_violations(&mut self)
Sort violations by file path and line number for consistent output
Trait Implementations§
Source§impl Clone for ValidationReport
impl Clone for ValidationReport
Source§fn clone(&self) -> ValidationReport
fn clone(&self) -> ValidationReport
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationReport
impl Debug for ValidationReport
Source§impl Default for ValidationReport
impl Default for ValidationReport
Source§impl<'de> Deserialize<'de> for ValidationReport
impl<'de> Deserialize<'de> for ValidationReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more