pub enum ErrorType {
Show 20 variants
Blank,
Invalid,
TooShort,
TooLong,
WrongLength,
NotANumber,
NotAnInteger,
GreaterThan,
LessThan,
EqualTo,
OtherThan,
GreaterThanOrEqualTo,
LessThanOrEqualTo,
Taken,
Accepted,
Confirmation,
Empty,
Exclusion,
Inclusion,
Custom(String),
}Expand description
Machine-readable validation error kinds.
Variants§
Blank
The attribute must be present but is blank.
Invalid
The attribute value is invalid.
TooShort
The attribute is shorter than the minimum length.
TooLong
The attribute is longer than the maximum length.
WrongLength
The attribute length does not match the required value.
NotANumber
The attribute is not numeric.
NotAnInteger
The attribute is numeric but not an integer.
GreaterThan
The attribute must be greater than another value.
LessThan
The attribute must be less than another value.
EqualTo
The attribute must equal another value.
OtherThan
The attribute must differ from another value.
GreaterThanOrEqualTo
The attribute must be greater than or equal to another value.
LessThanOrEqualTo
The attribute must be less than or equal to another value.
Taken
The attribute must be unique.
Accepted
The attribute must be accepted.
Confirmation
The attribute confirmation does not match.
Empty
The attribute must not be empty.
Exclusion
The attribute is excluded from an allowed set.
Inclusion
The attribute is not included in an allowed set.
Custom(String)
A custom application-defined error kind.
Trait Implementations§
impl Eq for ErrorType
impl StructuralPartialEq for ErrorType
Auto Trait Implementations§
impl Freeze for ErrorType
impl RefUnwindSafe for ErrorType
impl Send for ErrorType
impl Sync for ErrorType
impl Unpin for ErrorType
impl UnsafeUnpin for ErrorType
impl UnwindSafe for ErrorType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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