pub struct ValidationResult {
pub errors: Vec<ValidationError>,
}Expand description
Result of validating a GLDF product.
Fields§
§errors: Vec<ValidationError>All validation issues found
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn add(&mut self, error: ValidationError)
pub fn add(&mut self, error: ValidationError)
Adds an error to the result.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Returns true if there are any errors (not warnings or info).
Sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Returns true if there are any warnings.
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns true if the result is completely clean (no issues at all).
Sourcepub fn errors_only(&self) -> Vec<&ValidationError>
pub fn errors_only(&self) -> Vec<&ValidationError>
Returns only errors (excludes warnings and info).
Sourcepub fn warnings_only(&self) -> Vec<&ValidationError>
pub fn warnings_only(&self) -> Vec<&ValidationError>
Returns only warnings.
Sourcepub fn count_by_level(&self) -> (usize, usize, usize)
pub fn count_by_level(&self) -> (usize, usize, usize)
Returns the count of issues by level.
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 (const: unstable) · 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§fn default() -> ValidationResult
fn default() -> ValidationResult
Returns the “default value” for a type. 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