#[non_exhaustive]pub enum ViolationCode {
TooLong,
TooShort,
PatternMismatch,
EmptyRequiredList,
TooManyItems,
OutOfRange,
Inconsistent,
MissingConditional,
ExclusiveChoice,
Imprecise,
}Expand description
Classification of a Violation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TooLong
A string exceeded the maximum length given in the spec’s property table.
TooShort
A string was shorter than the spec’s minimum.
PatternMismatch
A string did not match the regular expression the spec gives for its type.
EmptyRequiredList
A list that the spec requires to be non-empty was empty.
TooManyItems
A list exceeded the maximum number of items the spec allows.
OutOfRange
A value was outside the range the spec allows.
Inconsistent
A field was syntactically fine but violates a cross-field rule of the spec.
MissingConditional
A conditionally required field was missing.
ExclusiveChoice
Exactly one of a group of mutually exclusive fields must be set, and that was not the case.
Imprecise
The value cannot survive a JSON round-trip without loss of precision.
Implementations§
Trait Implementations§
Source§impl Clone for ViolationCode
impl Clone for ViolationCode
impl Copy for ViolationCode
Source§impl Debug for ViolationCode
impl Debug for ViolationCode
Source§impl Display for ViolationCode
impl Display for ViolationCode
impl Eq for ViolationCode
Source§impl Hash for ViolationCode
impl Hash for ViolationCode
Source§impl PartialEq for ViolationCode
impl PartialEq for ViolationCode
impl StructuralPartialEq for ViolationCode
Auto Trait Implementations§
impl Freeze for ViolationCode
impl RefUnwindSafe for ViolationCode
impl Send for ViolationCode
impl Sync for ViolationCode
impl Unpin for ViolationCode
impl UnsafeUnpin for ViolationCode
impl UnwindSafe for ViolationCode
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<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
Compare self to
key and return true if they are equal.