#[non_exhaustive]pub enum ViolationCode {
TooLong,
IllegalCharacter,
EmptyRequiredList,
OutOfRange,
Inconsistent,
MissingConditional,
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.
IllegalCharacter
A string contained characters the spec forbids (non-printable, or non-ASCII in a
CiString).
EmptyRequiredList
A list that the spec marks with cardinality + (one or more) was empty.
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.
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
Source§fn clone(&self) -> ViolationCode
fn clone(&self) -> ViolationCode
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 ViolationCode
Source§impl Debug for ViolationCode
impl Debug 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.