pub enum IssueCode {
}Expand description
Stable, enumerable identifiers for every builtin constraint (ER-3), plus
IssueCode::Custom for consumer-defined ones.
Matchable today; additive variants in minor releases until v1 freezes it, so downstream matches should include a wildcard.
Variants§
Min
Value is shorter than the declared minimum length.
Max
Value exceeds the declared maximum length/bound.
Length
Length does not equal the declared exact length.
String does not look like an email address.
Url
String does not look like a URL.
Uuid
String does not look like a UUID.
Empty
String is empty where emptiness is forbidden.
Int
Number has a fractional part where an integer is required.
Positive
Number is zero or negative where positivity is required.
Finite
Float is NaN or infinite where finiteness is required.
BoolEquals
Boolean does not equal the expected value.
Coerce
String-to-type coercion failed.
Refine
A refinement closure rejected the value.
TypeMismatch
Erased-view value has the wrong variant for this schema.
Required
Declared object field is absent from the input object (purely structural: decided by key existence, never by the value found).
Custom(Box<str>)
Consumer-defined constraint identifier, carried verbatim from a
RefineRejection.
Builtins never produce this variant; it exists so a consumer running
several custom rules can tell them apart. IssueCode::Refine
collapses every rule into one code, which defeats keying a
translation table off IssueCode. The payload is an opaque
consumer namespace: formars neither interprets nor validates it.
Trait Implementations§
impl Eq for IssueCode
impl StructuralPartialEq for IssueCode
Auto Trait Implementations§
impl Freeze for IssueCode
impl RefUnwindSafe for IssueCode
impl Send for IssueCode
impl Sync for IssueCode
impl Unpin for IssueCode
impl UnsafeUnpin for IssueCode
impl UnwindSafe for IssueCode
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<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