pub enum ValidationErrorKind {
Required,
MaxTextLength(usize),
MinTextLength(usize),
MaxArraySize(usize),
EmptyArray,
InvalidFormat(&'static str),
MaxIntegerValue(i64),
MinIntegerValue(i64),
ExclusiveField(&'static str, &'static str),
EitherRequired(&'static str, &'static str),
NoFieldProvided,
}Expand description
Validation error variants.
Variants§
Required
Field is required but not provided.
MaxTextLength(usize)
Field exceeds maximum text length.
MinTextLength(usize)
Field does not meet minimum text length.
MaxArraySize(usize)
Field exceeds maximum array length.
EmptyArray
Field does not meet non-empty condition.
InvalidFormat(&'static str)
Field does not meet format condition.
MaxIntegerValue(i64)
Field exceeds maximum integer value.
MinIntegerValue(i64)
Field does not meet minimum integer value.
ExclusiveField(&'static str, &'static str)
Both fields are provided but only one is allowed.
EitherRequired(&'static str, &'static str)
Either field is required but none is provided.
NoFieldProvided
At least one field is required but none is provided.
Trait Implementations§
Source§impl Clone for ValidationErrorKind
impl Clone for ValidationErrorKind
Source§fn clone(&self) -> ValidationErrorKind
fn clone(&self) -> ValidationErrorKind
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationErrorKind
impl Debug for ValidationErrorKind
Source§impl Display for ValidationErrorKind
impl Display for ValidationErrorKind
Source§impl Error for ValidationErrorKind
impl Error for ValidationErrorKind
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for ValidationErrorKind
impl PartialEq for ValidationErrorKind
impl Copy for ValidationErrorKind
impl StructuralPartialEq for ValidationErrorKind
Auto Trait Implementations§
impl Freeze for ValidationErrorKind
impl RefUnwindSafe for ValidationErrorKind
impl Send for ValidationErrorKind
impl Sync for ValidationErrorKind
impl Unpin for ValidationErrorKind
impl UnwindSafe for ValidationErrorKind
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)