pub struct ValidationResult {
pub errors: Vec<ValidationError>,
}Expand description
Represents the result of a validation operation
Fields§
§errors: Vec<ValidationError>The list of validation errors found
Implementations§
Source§impl ValidationResult
impl ValidationResult
Sourcepub fn add_error(&mut self, field: &str, rule: ValidationRule, message: &str)
pub fn add_error(&mut self, field: &str, rule: ValidationRule, message: &str)
Adds an error to the validation result
Sourcepub fn merge_with_prefix(&mut self, prefix: &str, other: ValidationResult)
pub fn merge_with_prefix(&mut self, prefix: &str, other: ValidationResult)
Merges another validation result into this one, prefixing field paths
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§impl PartialEq for ValidationResult
impl PartialEq for ValidationResult
Source§fn eq(&self, other: &ValidationResult) -> bool
fn eq(&self, other: &ValidationResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq 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