Enum boon::ErrorKind

source ·
pub enum ErrorKind<'s, 'v> {
Show 38 variants Group, Schema { url: &'s str, }, ContentSchema, PropertyName { prop: String, }, Reference { kw: &'static str, url: &'s str, }, RefCycle { url: &'s str, kw_loc1: String, kw_loc2: String, }, FalseSchema, Type { got: Type, want: Types, }, Enum { want: &'s Vec<Value>, }, Const { want: &'s Value, }, Format { got: Cow<'v, Value>, want: &'static str, err: Box<dyn Error>, }, MinProperties { got: usize, want: usize, }, MaxProperties { got: usize, want: usize, }, AdditionalProperties { got: Vec<Cow<'v, str>>, }, Required { want: Vec<&'s str>, }, Dependency { prop: &'s str, missing: Vec<&'s str>, }, DependentRequired { prop: &'s str, missing: Vec<&'s str>, }, MinItems { got: usize, want: usize, }, MaxItems { got: usize, want: usize, }, Contains, MinContains { got: Vec<usize>, want: usize, }, MaxContains { got: Vec<usize>, want: usize, }, UniqueItems { got: [usize; 2], }, AdditionalItems { got: usize, }, MinLength { got: usize, want: usize, }, MaxLength { got: usize, want: usize, }, Pattern { got: Cow<'v, str>, want: &'s str, }, ContentEncoding { want: &'static str, err: Box<dyn Error>, }, ContentMediaType { got: Vec<u8>, want: &'static str, err: Box<dyn Error>, }, Minimum { got: Cow<'v, Number>, want: &'s Number, }, Maximum { got: Cow<'v, Number>, want: &'s Number, }, ExclusiveMinimum { got: Cow<'v, Number>, want: &'s Number, }, ExclusiveMaximum { got: Cow<'v, Number>, want: &'s Number, }, MultipleOf { got: Cow<'v, Number>, want: &'s Number, }, Not, AllOf, AnyOf, OneOf(Option<(usize, usize)>),
}
Expand description

A list specifying general categories of validation errors.

Variants§

§

Group

§

Schema

Fields

§url: &'s str
§

ContentSchema

§

PropertyName

Fields

§prop: String
§

Reference

Fields

§kw: &'static str
§url: &'s str
§

RefCycle

Fields

§url: &'s str
§kw_loc1: String
§kw_loc2: String
§

FalseSchema

§

Type

Fields

§got: Type
§want: Types
§

Enum

Fields

§want: &'s Vec<Value>
§

Const

Fields

§want: &'s Value
§

Format

Fields

§got: Cow<'v, Value>
§want: &'static str
§err: Box<dyn Error>
§

MinProperties

Fields

§got: usize
§want: usize
§

MaxProperties

Fields

§got: usize
§want: usize
§

AdditionalProperties

Fields

§got: Vec<Cow<'v, str>>
§

Required

Fields

§want: Vec<&'s str>
§

Dependency

Fields

§prop: &'s str

dependency of prop that failed.

§missing: Vec<&'s str>

missing props.

§

DependentRequired

Fields

§prop: &'s str

dependency of prop that failed.

§missing: Vec<&'s str>

missing props.

§

MinItems

Fields

§got: usize
§want: usize
§

MaxItems

Fields

§got: usize
§want: usize
§

Contains

§

MinContains

Fields

§got: Vec<usize>
§want: usize
§

MaxContains

Fields

§got: Vec<usize>
§want: usize
§

UniqueItems

Fields

§got: [usize; 2]
§

AdditionalItems

Fields

§got: usize
§

MinLength

Fields

§got: usize
§want: usize
§

MaxLength

Fields

§got: usize
§want: usize
§

Pattern

Fields

§got: Cow<'v, str>
§want: &'s str
§

ContentEncoding

Fields

§want: &'static str
§err: Box<dyn Error>
§

ContentMediaType

Fields

§got: Vec<u8>
§want: &'static str
§err: Box<dyn Error>
§

Minimum

Fields

§got: Cow<'v, Number>
§want: &'s Number
§

Maximum

Fields

§got: Cow<'v, Number>
§want: &'s Number
§

ExclusiveMinimum

Fields

§got: Cow<'v, Number>
§want: &'s Number
§

ExclusiveMaximum

Fields

§got: Cow<'v, Number>
§want: &'s Number
§

MultipleOf

Fields

§got: Cow<'v, Number>
§want: &'s Number
§

Not

§

AllOf

none of the subschemas matched

§

AnyOf

none of the subschemas matched.

§

OneOf(Option<(usize, usize)>)

  • None: none of the schemas matched.
  • Some(i, j): subschemas at i, j matched

Implementations§

source§

impl<'s, 'v> ErrorKind<'s, 'v>

source

pub fn keyword_path(&self) -> Option<KeywordPath<'s>>

Trait Implementations§

source§

impl<'s, 'v> Debug for ErrorKind<'s, 'v>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'s, 'v> Display for ErrorKind<'s, 'v>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'s, 'v> !RefUnwindSafe for ErrorKind<'s, 'v>

§

impl<'s, 'v> !Send for ErrorKind<'s, 'v>

§

impl<'s, 'v> !Sync for ErrorKind<'s, 'v>

§

impl<'s, 'v> Unpin for ErrorKind<'s, 'v>

§

impl<'s, 'v> !UnwindSafe for ErrorKind<'s, 'v>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.