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 duplicate 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§impl Serialize for ValidationErrors
impl Serialize for ValidationErrors
impl StructuralPartialEq for ValidationErrors
Auto Trait Implementations§
impl Freeze for ValidationErrors
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
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>
Converts
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>
Converts
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