#[non_exhaustive]pub enum FailureKind {
MissingSchema,
UnknownInheritedSchema {
id: String,
},
InheritanceCycle {
id: String,
},
TypeMismatch {
expected: DataType,
found: JsonType,
},
NotAnInteger {
value: Number,
},
NotAnOption {
value: String,
options: Vec<String>,
},
MissingKey {
key: String,
},
TooFewElements {
len: usize,
min: Number,
},
TooManyElements {
len: usize,
max: Number,
},
MissingRestrictions {
data_type: DataType,
},
UnknownDataType {
name: String,
},
}Expand description
What is wrong with one attribute value.
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.
MissingSchema
The attribute id names no schema.
UnknownInheritedSchema
A value description inherits from a schema id that does not exist.
InheritanceCycle
Following inherits leads back to a schema already being checked.
TypeMismatch
The value has the wrong JSON type for the dataType.
NotAnInteger
An Integer value has a fractional part.
NotAnOption
An Enum value is not one of the options.
MissingKey
An object lacks a key that is not optional.
TooFewElements
An array has fewer elements than arrayRestrictions.min.
TooManyElements
An array has more elements than arrayRestrictions.max.
MissingRestrictions
An Enum or Array description lacks the restrictions it needs, so
the value cannot be checked.
UnknownDataType
The dataType is not one this crate knows, so the value cannot be
checked.
Trait Implementations§
Source§impl Clone for FailureKind
impl Clone for FailureKind
Source§fn clone(&self) -> FailureKind
fn clone(&self) -> FailureKind
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FailureKind
impl Debug for FailureKind
Source§impl Display for FailureKind
impl Display for FailureKind
Source§impl PartialEq for FailureKind
impl PartialEq for FailureKind
impl StructuralPartialEq for FailureKind
Auto Trait Implementations§
impl Freeze for FailureKind
impl RefUnwindSafe for FailureKind
impl Send for FailureKind
impl Sync for FailureKind
impl Unpin for FailureKind
impl UnwindSafe for FailureKind
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