pub enum PrimitiveErrorKind {
Empty,
TooShort,
TooLong,
OutOfRange,
InvalidFormat,
}Expand description
Stable category for a primitive validation error.
This lets callers match on broad failure kinds without depending on display text or static validation messages.
Variants§
Empty
The value was empty or whitespace-only.
TooShort
The value was shorter than the minimum allowed length.
TooLong
The value was longer than the maximum allowed length.
OutOfRange
The value was outside the inclusive allowed range.
InvalidFormat
The value did not match the expected format.
Trait Implementations§
Source§impl Clone for PrimitiveErrorKind
impl Clone for PrimitiveErrorKind
Source§fn clone(&self) -> PrimitiveErrorKind
fn clone(&self) -> PrimitiveErrorKind
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 moreimpl Copy for PrimitiveErrorKind
Source§impl Debug for PrimitiveErrorKind
impl Debug for PrimitiveErrorKind
impl Eq for PrimitiveErrorKind
Source§impl Hash for PrimitiveErrorKind
impl Hash for PrimitiveErrorKind
Source§impl PartialEq for PrimitiveErrorKind
impl PartialEq for PrimitiveErrorKind
Source§fn eq(&self, other: &PrimitiveErrorKind) -> bool
fn eq(&self, other: &PrimitiveErrorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PrimitiveErrorKind
Auto Trait Implementations§
impl Freeze for PrimitiveErrorKind
impl RefUnwindSafe for PrimitiveErrorKind
impl Send for PrimitiveErrorKind
impl Sync for PrimitiveErrorKind
impl Unpin for PrimitiveErrorKind
impl UnsafeUnpin for PrimitiveErrorKind
impl UnwindSafe for PrimitiveErrorKind
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