pub enum Warning {
UnexpectedField,
MissingField {
name: &'static str,
},
NullField,
TypeMismatch {
expected: ValueKind,
actual: ValueKind,
},
StringTooLong {
max: usize,
len: usize,
},
FieldInvalidValue {
expected: &'static [&'static str],
actual: String,
},
Cardinality {
expected: Cardinality,
len: usize,
},
}Expand description
A structural problem found while validating a JSON document against a [Schema].
Variants§
UnexpectedField
A field present in the JSON that the schema does not list.
MissingField
A required field absent from its containing object.
NullField
A field whose value is JSON null. null fields can simply be omitted.
TypeMismatch
A value whose JSON kind does not match the schema.
Fields
StringTooLong
A string longer than the maximum length the schema permits.
Fields
FieldInvalidValue
A string value that is not one of an enum field’s permitted variants.
Fields
Cardinality
An array holding fewer elements than its declared Cardinality requires.
Fields
§
expected: CardinalityThe cardinality the schema requires.
Trait Implementations§
impl Eq for Warning
impl StructuralPartialEq for Warning
Auto Trait Implementations§
impl Freeze for Warning
impl RefUnwindSafe for Warning
impl Send for Warning
impl Sync for Warning
impl Unpin for Warning
impl UnsafeUnpin for Warning
impl UnwindSafe for Warning
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