Struct validify::ValidationErrors
source · pub struct ValidationErrors(/* private fields */);Implementations§
source§impl ValidationErrors
impl ValidationErrors
pub fn new() -> ValidationErrors
sourcepub fn merge(&mut self, errors: ValidationErrors)
pub fn merge(&mut self, errors: ValidationErrors)
Merge validation errors from the given arg to the calling errors.
sourcepub fn errors(&self) -> &[ValidationError]
pub fn errors(&self) -> &[ValidationError]
Returns a slice of all the errors that ocurred during validation
pub fn add(&mut self, error: ValidationError)
pub fn is_empty(&self) -> bool
pub fn errors_mut(&mut self) -> &mut [ValidationError]
pub fn field_errors(&self) -> Vec<ValidationError>
pub fn schema_errors(&self) -> Vec<ValidationError>
Trait Implementations§
source§impl Clone for ValidationErrors
impl Clone for ValidationErrors
source§fn clone(&self) -> ValidationErrors
fn clone(&self) -> ValidationErrors
Returns a copy 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 moresource§impl Debug for ValidationErrors
impl Debug for ValidationErrors
source§impl Default for ValidationErrors
impl Default for ValidationErrors
source§fn default() -> ValidationErrors
fn default() -> ValidationErrors
Returns the “default value” for a type. Read more
source§impl Display for ValidationErrors
impl Display for ValidationErrors
source§impl Error for ValidationErrors
impl Error for ValidationErrors
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§impl PartialEq for ValidationErrors
impl PartialEq for ValidationErrors
source§fn eq(&self, other: &ValidationErrors) -> bool
fn eq(&self, other: &ValidationErrors) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for ValidationErrors
impl Serialize for ValidationErrors
impl StructuralPartialEq for ValidationErrors
Auto Trait Implementations§
impl RefUnwindSafe for ValidationErrors
impl Send for ValidationErrors
impl Sync for ValidationErrors
impl Unpin for ValidationErrors
impl UnwindSafe for ValidationErrors
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