[][src]Enum verify::schemars::errors::ErrorValue

pub enum ErrorValue<S: Span> {
    NotAllowed,
    InvalidSchema(InvalidSchema),
    UnsupportedValue(UnsupportedValue),
    InvalidType {
        expected: SingleOrVec<InstanceType>,
    },
    InvalidEnumValue {
        expected: Vec<Value>,
    },
    NotMultipleOf {
        multiple_of: f64,
    },
    LessThanExpected {
        min: f64,
        exclusive: bool,
    },
    MoreThanExpected {
        max: f64,
        exclusive: bool,
    },
    NoPatternMatch {
        pattern: String,
    },
    TooLong {
        max_length: u32,
    },
    TooShort {
        min_length: u32,
    },
    NoneValid {
        errors: Vec<Errors<S>>,
    },
    MoreThanOneValid {
        matched: Vec<Option<Box<Metadata>>>,
    },
    ValidNot {
        matched: Option<Box<Metadata>>,
    },
    NotUnique {
        first: Option<S>,
        duplicate: Option<S>,
    },
    MustContain {
        schema: Option<Box<Metadata>>,
    },
    NotEnoughItems {
        min: usize,
    },
    TooManyItems {
        max: usize,
    },
    NotEnoughProperties {
        min: usize,
    },
    TooManyProperties {
        max: usize,
    },
    RequiredProperty {
        name: String,
    },
    Custom(String),
}
This is supported on feature="schemars" only.

All the validation errors that can occur.

Variants

NotAllowed
This is supported on feature="schemars" only.

Indicates that the schema will never match any value.

InvalidSchema(InvalidSchema)
This is supported on feature="schemars" only.

Indicates that the schema itself is invalid.

UnsupportedValue(UnsupportedValue)
This is supported on feature="schemars" only.

Indicates incompatible value that cannot be validated by a schema.

InvalidType
This is supported on feature="schemars" only.

Indicates invalid type.

Fields of InvalidType

expected: SingleOrVec<InstanceType>
This is supported on feature="schemars" only.
InvalidEnumValue
This is supported on feature="schemars" only.

Indicates invalid enum value.

Fields of InvalidEnumValue

expected: Vec<Value>
This is supported on feature="schemars" only.
NotMultipleOf
This is supported on feature="schemars" only.

Indicates that the number is not multiple of the given value.

Fields of NotMultipleOf

multiple_of: f64
This is supported on feature="schemars" only.
LessThanExpected
This is supported on feature="schemars" only.

Indicates that the number is less than the given minimum value.

Fields of LessThanExpected

min: f64
This is supported on feature="schemars" only.
exclusive: bool
This is supported on feature="schemars" only.
MoreThanExpected
This is supported on feature="schemars" only.

Indicates that the number is more than the given maximum value.

Fields of MoreThanExpected

max: f64
This is supported on feature="schemars" only.
exclusive: bool
This is supported on feature="schemars" only.
NoPatternMatch
This is supported on feature="schemars" only.

Indicates that the string doesn't match the given pattern.

Fields of NoPatternMatch

pattern: String
This is supported on feature="schemars" only.
TooLong
This is supported on feature="schemars" only.

Indicates that the string is too long.

Fields of TooLong

max_length: u32
This is supported on feature="schemars" only.
TooShort
This is supported on feature="schemars" only.

Indicates that the string is too short.

Fields of TooShort

min_length: u32
This is supported on feature="schemars" only.
NoneValid
This is supported on feature="schemars" only.

Indicates that none of the subschemas matched.

Fields of NoneValid

errors: Vec<Errors<S>>
This is supported on feature="schemars" only.
MoreThanOneValid
This is supported on feature="schemars" only.

Indicates that more than one of the subschemas matched.

Fields of MoreThanOneValid

matched: Vec<Option<Box<Metadata>>>
This is supported on feature="schemars" only.
ValidNot
This is supported on feature="schemars" only.

Indicates that a not schema matched.

Fields of ValidNot

matched: Option<Box<Metadata>>
This is supported on feature="schemars" only.
NotUnique
This is supported on feature="schemars" only.

Indicates that the items in the array are not unique.

Fields of NotUnique

first: Option<S>
This is supported on feature="schemars" only.
duplicate: Option<S>
This is supported on feature="schemars" only.
MustContain
This is supported on feature="schemars" only.

Indicates that the array doesn't contain the value of a given schema.

Fields of MustContain

schema: Option<Box<Metadata>>
This is supported on feature="schemars" only.
NotEnoughItems
This is supported on feature="schemars" only.

Indicates that the array doesn't have enough items.

Fields of NotEnoughItems

min: usize
This is supported on feature="schemars" only.
TooManyItems
This is supported on feature="schemars" only.

Indicates that the array has too many items.

Fields of TooManyItems

max: usize
This is supported on feature="schemars" only.
NotEnoughProperties
This is supported on feature="schemars" only.

Indicates that the object has too few properties.

Fields of NotEnoughProperties

min: usize
This is supported on feature="schemars" only.
TooManyProperties
This is supported on feature="schemars" only.

Indicates that the object has too many properties.

Fields of TooManyProperties

max: usize
This is supported on feature="schemars" only.
RequiredProperty
This is supported on feature="schemars" only.

Indicates that a required property is missing.

Fields of RequiredProperty

name: String
This is supported on feature="schemars" only.
Custom(String)
This is supported on feature="schemars" only.

Any error that does not originate from the validator.

Trait Implementations

impl<S: Clone + Span> Clone for ErrorValue<S>[src]

impl<S: Debug + Span> Debug for ErrorValue<S>[src]

impl<S: Span> Display for ErrorValue<S>[src]

impl<S: PartialEq + Span> PartialEq<ErrorValue<S>> for ErrorValue<S>[src]

impl<S: Span> StructuralPartialEq for ErrorValue<S>[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for ErrorValue<S> where
    S: RefUnwindSafe

impl<S> Send for ErrorValue<S> where
    S: Send

impl<S> Sync for ErrorValue<S> where
    S: Sync

impl<S> Unpin for ErrorValue<S> where
    S: Unpin

impl<S> UnwindSafe for ErrorValue<S> where
    S: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.