pub struct ValidationResult {
pub passed: bool,
pub issues: Vec<Issue>,
pub files_checked: usize,
pub duration_ms: Option<u64>,
}Expand description
Validation result
Fields§
§passed: boolWhether validation passed
issues: Vec<Issue>Issues found
files_checked: usizeNumber of files checked
duration_ms: Option<u64>Duration of validation
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn merge(&mut self, other: ValidationResult)
pub fn merge(&mut self, other: ValidationResult)
Merge another result into this one
Sourcepub fn count_by_severity(&self, severity: Severity) -> usize
pub fn count_by_severity(&self, severity: Severity) -> usize
Get the count of issues by severity
Sourcepub fn error_count(&self) -> usize
pub fn error_count(&self) -> usize
Get total errors
Sourcepub fn warning_count(&self) -> usize
pub fn warning_count(&self) -> usize
Get total warnings
Sourcepub fn finalize_with_strict_mode(&mut self, strict_mode: bool)
pub fn finalize_with_strict_mode(&mut self, strict_mode: bool)
Finalize validation result with strict mode consideration In strict mode, warnings are treated as errors
Sourcepub fn is_passing_with_strict(&self, strict_mode: bool) -> bool
pub fn is_passing_with_strict(&self, strict_mode: bool) -> bool
Check if validation passes considering strict mode
Trait Implementations§
Source§impl Clone for ValidationResult
impl Clone for ValidationResult
Source§fn clone(&self) -> ValidationResult
fn clone(&self) -> ValidationResult
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 ValidationResult
impl Debug for ValidationResult
Source§impl Default for ValidationResult
impl Default for ValidationResult
Source§impl<'de> Deserialize<'de> for ValidationResult
impl<'de> Deserialize<'de> for ValidationResult
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 ValidationResult
impl RefUnwindSafe for ValidationResult
impl Send for ValidationResult
impl Sync for ValidationResult
impl Unpin for ValidationResult
impl UnsafeUnpin for ValidationResult
impl UnwindSafe for ValidationResult
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