pub struct ValidationResult { /* private fields */ }Expand description
The result of validating a value or schema.
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn errors(&self) -> &[ValidationError]
pub fn errors(&self) -> &[ValidationError]
The list of validation errors.
Sourcepub fn add_error(&mut self, error: ValidationError)
pub fn add_error(&mut self, error: ValidationError)
Add an error to the result.
Sourcepub fn merge(&mut self, other: ValidationResult)
pub fn merge(&mut self, other: ValidationResult)
Merge another validation result into this one.
Sourcepub fn into_result(self) -> Result<(), ValidationErrors>
pub fn into_result(self) -> Result<(), ValidationErrors>
Convert the result into Ok(()) when valid, or a
ValidationErrors aggregate on failure.
Trait Implementations§
Source§impl Clone for ValidationResult
impl Clone for ValidationResult
Source§impl Debug for ValidationResult
impl Debug for ValidationResult
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