pub struct ValidationResult {
pub diagnostics: Vec<Diagnostic>,
pub files_checked: usize,
pub validation_time_ms: Option<u64>,
pub validator_factories_registered: usize,
}Expand description
Result of validating a project, including diagnostics and metadata.
All fields are public. Use ValidationResult::new for convenient construction when only
diagnostics and files_checked are known; struct literal construction is also supported.
Note: adding a new public field in the future would be a breaking change for struct literals
and exhaustive destructuring patterns. For forward-compatible code, prefer
ValidationResult::new and use .. in destructure patterns.
Fields§
§diagnostics: Vec<Diagnostic>Diagnostics found during validation.
files_checked: usizeNumber of files that were checked (excludes Unknown file types).
validation_time_ms: Option<u64>Wall-clock time spent in validation, in milliseconds.
validator_factories_registered: usizeNumber of validator instances registered in the registry (not the count of validators executed). The field name uses “factories” for backward compatibility; since v0.12.2 this counts pre-built cached instances rather than factory invocations.
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn new(diagnostics: Vec<Diagnostic>, files_checked: usize) -> Self
pub fn new(diagnostics: Vec<Diagnostic>, files_checked: usize) -> Self
Create a new ValidationResult with the given diagnostics and file count.
Metadata fields (validation_time_ms, validator_factories_registered) default to
None / 0 and can be set with the builder-style helpers.
Sourcepub fn with_timing(self, ms: u64) -> Self
pub fn with_timing(self, ms: u64) -> Self
Set the wall-clock validation time (builder pattern).
Sourcepub fn with_validator_factories_registered(self, count: usize) -> Self
pub fn with_validator_factories_registered(self, count: usize) -> Self
Set the total number of validator factories registered (builder pattern).
Trait Implementations§
Source§impl Clone for ValidationResult
impl Clone for ValidationResult
Source§fn clone(&self) -> ValidationResult
fn clone(&self) -> ValidationResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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