pub struct ValidationResult {
pub issues: Vec<ValidationIssue>,
pub validation_time_us: u64,
pub is_valid: bool,
pub warning_count: usize,
pub error_count: usize,
pub timestamp: Instant,
}Expand description
Validation results with caching and statistics
Fields§
§issues: Vec<ValidationIssue>All validation issues found
validation_time_us: u64Available on crate feature
std only.Time taken for validation in microseconds
is_valid: boolWhether the document passed validation
warning_count: usizeNumber of warnings found
error_count: usizeNumber of errors found
timestamp: InstantAvailable on crate feature
std only.Validation timestamp for cache invalidation
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn new(issues: Vec<ValidationIssue>) -> Self
pub fn new(issues: Vec<ValidationIssue>) -> Self
Create a new validation result
Sourcepub fn issues_with_severity(
&self,
min_severity: ValidationSeverity,
) -> Vec<&ValidationIssue>
pub fn issues_with_severity( &self, min_severity: ValidationSeverity, ) -> Vec<&ValidationIssue>
Filter issues by severity
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 moreAuto Trait Implementations§
impl Freeze for ValidationResult
impl RefUnwindSafe for ValidationResult
impl Send for ValidationResult
impl Sync for ValidationResult
impl Unpin 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