Skip to main content

ValidationError

Enum ValidationError 

Source
#[non_exhaustive]
pub enum ValidationError {
Show 100 variants UnsupportedOpenApiVersion { version: String, }, UnsupportedComponentType { schema: String, kind: String, }, MissingComponentSchemaType { schema: String, }, MissingObjectProperties { schema: String, }, MissingPaths, UnsupportedEnumType { context: String, kind: String, }, NonArrayEnum { context: String, }, EmptyEnum { context: String, }, NonStringEnumValue { context: String, }, ConstNotInEnum { context: String, }, InvalidSatayEnumVariants { context: String, }, UnknownSatayEnumVariantValue { context: String, wire_name: String, }, InvalidSatayEnumVariantName { context: String, wire_name: String, }, ReservedSatayEnumVariantName { context: String, wire_name: String, rust_name: String, }, DuplicateSatayEnumVariantName { context: String, rust_name: String, }, NonArrayRequired { context: String, }, NonStringRequiredField { context: String, }, UnsupportedIntegerFormat { context: String, format: String, }, UnsupportedNumberFormat { context: String, format: String, }, UnsupportedSatayParseAs { context: String, parse_as: String, }, InvalidSatayParseAs { context: String, }, SatayParseAsRequiresString { context: String, parse_as: String, kind: String, }, UnsupportedSatayIntegerType { context: String, integer_type: String, }, InvalidSatayIntegerType { context: String, }, SatayIntegerTypeRequiresInteger { context: String, integer_type: String, kind: String, }, MissingArrayItems { context: String, }, InlineObjectSchema { context: String, }, UnsupportedMapObjectSchema { context: String, }, UnsupportedSchemaType { context: String, kind: String, }, MissingSchemaType { context: String, }, UnsupportedBooleanSchema { context: String, }, MultipleNonNullSchemaTypesUnsupported { context: String, }, UnsupportedComposition { context: String, keyword: &'static str, }, UnsupportedAllOfSiblingKeyword { context: String, keyword: String, }, UnsupportedAllOfBranch { context: String, index: usize, }, DuplicateAllOfProperty { context: String, property: String, }, RecursiveAllOf { context: String, schema: String, }, RecursiveDiscriminatorBranch { context: String, schema: String, }, UnsupportedAnyOfSiblingKeyword { context: String, keyword: String, }, UnsupportedAnyOfBranch { context: String, index: usize, }, UnsupportedOneOfSiblingKeyword { context: String, keyword: String, }, UnsupportedOneOfBranch { context: String, index: usize, }, DuplicateUnionNullBranch { context: String, keyword: &'static str, index: usize, }, DuplicateOpenStringEnumValue { context: String, value: String, }, NullableUnionWithoutVariants { context: String, keyword: &'static str, }, ShadowedUnionBranch { context: String, keyword: &'static str, index: usize, shadowed_by: usize, }, EmptyAnyOf { context: String, }, RecursiveAnyOf { context: String, schema: String, }, InvalidDiscriminatorUnion { context: String, }, UnsupportedDiscriminatorBranch { context: String, keyword: &'static str, index: usize, }, DiscriminatorBranchNotObject { context: String, schema: String, }, DiscriminatorPropertyConflict { context: String, schema: String, property: String, }, InvalidDiscriminatorProperty { context: String, schema: String, property: String, expected: &'static str, }, InvalidDiscriminatorMapping { context: String, value: String, target: String, }, DuplicateDiscriminatorMapping { context: String, schema: String, }, DiscriminatorMappingValueMismatch { context: String, schema: String, value: String, actual: String, }, DuplicateDiscriminatorValue { context: String, value: String, }, InvalidStringLengthBounds { context: String, min_length: u64, max_length: u64, }, UniqueItemsUnsupported { context: String, }, InvalidArrayLengthBounds { context: String, min_items: u64, max_items: u64, }, UnsupportedKeyword { context: String, keyword: &'static str, }, InvalidNonNegativeIntegerKeyword { context: String, keyword: &'static str, }, InvalidBooleanKeyword { context: String, keyword: &'static str, }, ExclusiveLimitRequiresBound { context: String, exclusive_keyword: &'static str, keyword: &'static str, }, InvalidFiniteNumberKeyword { context: String, keyword: &'static str, }, ExpectedInteger { context: String, }, EmptyIntegerBounds { context: String, }, ExclusiveIntegerMinimumOverflow, ExclusiveIntegerMaximumOverflow, EmptyNumberBounds { context: String, }, MissingOperationResponses { operation_id: String, }, ExpectedArray { context: String, }, UnsupportedParameterLocation { context: String, wire_name: String, location: String, }, ContentParameterUnsupported { context: String, wire_name: String, }, MissingParameterSchema { context: String, wire_name: String, }, NullableParameterUnsupported { wire_name: String, }, AnyOfParameterUnsupported { wire_name: String, }, MapParameterUnsupported { wire_name: String, }, ArrayPathParameterUnsupported { wire_name: String, }, ArrayHeaderParameterUnsupported { wire_name: String, }, PathParameterNotRequired { wire_name: String, }, MissingContent { context: String, }, MissingJsonContent { context: String, }, MissingJsonSchema { context: String, }, DefaultResponseBodyUnsupported { context: String, }, InvalidStatusCode { context: String, status: String, }, OutOfRangeStatusCode { context: String, status_code: u16, }, MissingResponseJsonContent { context: String, status: String, }, UnclosedPathParameter { path: String, }, EmptyPathParameter { path: String, }, UndeclaredPathParameter { path: String, name: String, }, UnusedPathParameter { path: String, name: String, }, ResolveReference { reference: String, context: String, source: Box<ValidationError>, }, NonLocalReference, InvalidLocalReference, MissingJsonPointerToken { token: String, }, InvalidComponentReference { reference: String, section: &'static str, }, CircularReference { reference: String, }, ExpectedObject { context: String, }, ExpectedObjectField { context: String, field: &'static str, },
}
Expand description

Errors that can occur while validating an OpenAPI document.

This enum is non_exhaustive so new variants may be added in future releases without a semver break.

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.
§

UnsupportedOpenApiVersion

The OpenAPI version is not supported.

Error message: unsupported OpenAPI version {version}; Satay supports OpenAPI 3.1

Fields

§version: String
§

UnsupportedComponentType

A schema component uses a type that is not supported.

Error message: unsupported type {kind}in schema{schema}``

Fields

§schema: String
§kind: String
§

MissingComponentSchemaType

A schema component is missing a required type, $ref, enum, or properties declaration.

Error message: schema {schema}must declaretype, $ref, enum, or properties``

Fields

§schema: String
§

MissingObjectProperties

An object schema is missing the required properties field.

Error message: object schema {schema}must declareproperties``

Fields

§schema: String
§

MissingPaths

The OpenAPI document is missing the required paths field.

Error message: OpenAPI document must declare paths``

§

UnsupportedEnumType

A schema uses an enum with a non-string type.

Error message: {context} uses enum type {kind}; only string enums are supported

Fields

§context: String
§kind: String
§

NonArrayEnum

A schema declares an enum that is not an array.

Error message: {context} has a non-array enum

Fields

§context: String
§

EmptyEnum

A schema declares an enum with no values.

Error message: {context} has an empty enum

Fields

§context: String
§

NonStringEnumValue

A schema enum contains a non-string value.

Error message: {context} contains a non-string enum value; only string enums are supported

Fields

§context: String
§

ConstNotInEnum

A schema declares a const value that is not one of its enum values.

Error message: {context} declares a constvalue that is not in itsenum``

Fields

§context: String
§

InvalidSatayEnumVariants

An x-satay.enum-variants value is not an object.

Error message: {context}.x-satay.enum-variants must be an object

Fields

§context: String
§

UnknownSatayEnumVariantValue

An x-satay.enum-variants entry points at a value that is not in the enum.

Error message: {context}.x-satay.enum-variants contains {wire_name}, which is not declared in the enum

Fields

§context: String
§wire_name: String
§

InvalidSatayEnumVariantName

An x-satay.enum-variants entry has a non-string Rust variant name.

Error message: {context}.x-satay.enum-variants[{wire_name:?}] must be a string

Fields

§context: String
§wire_name: String
§

ReservedSatayEnumVariantName

An x-satay.enum-variants entry uses a name reserved for generated fallback variants.

Error message: {context}.x-satay.enum-variants[{wire_name:?}] uses reserved fallback variant {rust_name}``

Fields

§context: String
§wire_name: String
§rust_name: String
§

DuplicateSatayEnumVariantName

Two x-satay.enum-variants entries produce the same Rust variant name.

Error message: {context}.x-satay.enum-variants maps multiple values to {rust_name}``

Fields

§context: String
§rust_name: String
§

NonArrayRequired

A schema has a required field that is not an array.

Error message: {context} has a non-array required field

Fields

§context: String
§

NonStringRequiredField

A schema required array contains a non-string element.

Error message: {context} has a non-string required field name

Fields

§context: String
§

UnsupportedIntegerFormat

An integer schema uses an unsupported format.

Error message: {context} uses unsupported integer format {format}``

Fields

§context: String
§format: String
§

UnsupportedNumberFormat

A number schema uses an unsupported format.

Error message: {context} uses unsupported number format {format}``

Fields

§context: String
§format: String
§

UnsupportedSatayParseAs

An x-satay.parse-as value is not a supported target type.

Error message: {context} uses unsupported x-satay.parse-as {parse_as}``

Fields

§context: String
§parse_as: String
§

InvalidSatayParseAs

An x-satay.parse-as value is not a string.

Error message: {context}.x-satay.parse-as must be a string

Fields

§context: String
§

SatayParseAsRequiresString

x-satay.parse-as was applied to an unsupported wire schema.

Error message: {context} uses x-satay.parse-as {parse_as}on{kind}; supported parse-as wire schemas are string schemas, plus integer schemas for bool

Fields

§context: String
§parse_as: String
§kind: String
§

UnsupportedSatayIntegerType

An x-satay.integer-type value is not a supported Rust integer type.

Error message: {context} uses unsupported x-satay.integer-type {integer_type}``

Fields

§context: String
§integer_type: String
§

InvalidSatayIntegerType

An x-satay.integer-type value is not a string.

Error message: {context}.x-satay.integer-type must be a string

Fields

§context: String
§

SatayIntegerTypeRequiresInteger

x-satay.integer-type was applied to a non-integer schema.

Error message: {context} uses x-satay.integer-type {integer_type}on{kind}; supported integer-type wire schemas are integer schemas and string schemas with x-satay.parse-as integer-range

Fields

§context: String
§integer_type: String
§kind: String
§

MissingArrayItems

An array schema is missing the required items field.

Error message: {context} array schema must declare items``

Fields

§context: String
§

InlineObjectSchema

A schema defines an inline object instead of using a $ref.

Error message: {context} is an inline object schema; move it to components/schemas and use $ref``

Fields

§context: String
§

UnsupportedMapObjectSchema

An object schema has no properties (i.e. acts as a map/dictionary), which is unsupported.

Error message: {context} is an object with neither propertiesnor a supportedadditionalProperties schema

Fields

§context: String
§

UnsupportedSchemaType

A schema uses an unsupported type.

Error message: {context} uses unsupported schema type {kind}``

Fields

§context: String
§kind: String
§

MissingSchemaType

A schema is missing a required type, $ref, or enum declaration.

Error message: {context} must declare type, $ref, or enum``

Fields

§context: String
§

UnsupportedBooleanSchema

A JSON Schema boolean schema was used; Satay has no IR equivalent yet.

Error message: {context} is a boolean schema; boolean JSON Schemas are not supported yet

Fields

§context: String
§

MultipleNonNullSchemaTypesUnsupported

A schema type array contains more than one non-null type.

Error message: {context} declares multiple non-null schema types; Satay supports at most one plus null

Fields

§context: String
§

UnsupportedComposition

A schema uses a composition keyword (allOf, anyOf, oneOf) in an unsupported context.

Error message: {context} uses {keyword}, which is not supported in this context

Fields

§context: String
§keyword: &'static str
§

UnsupportedAllOfSiblingKeyword

An allOf schema combines supported struct flattening with another schema keyword.

Error message: {context} uses allOfwith{keyword}; only object branch flattening is supported

Fields

§context: String
§keyword: String
§

UnsupportedAllOfBranch

An allOf branch cannot be flattened into a generated Rust struct.

Error message: {context}.allOf[{index}] must be a local component schema reference or object schema with properties

Fields

§context: String
§index: usize
§

DuplicateAllOfProperty

Two allOf branches declare the same object property.

Error message: {context} declares duplicate allOfproperty{property}``

Fields

§context: String
§property: String
§

RecursiveAllOf

allOf component schemas form a recursive flattening cycle.

Error message: {context} forms a recursive allOfcycle through schema{schema}``

Fields

§context: String
§schema: String
§

RecursiveDiscriminatorBranch

A discriminator union branch component recursively contains its own union.

Error message: {context} forms a recursive discriminator cycle through branch schema {schema}``

Fields

§context: String
§schema: String
§

UnsupportedAnyOfSiblingKeyword

An anyOf schema combines a supported union with another schema keyword.

Error message: {context} uses anyOfwith{keyword}; only annotation siblings are supported

Fields

§context: String
§keyword: String
§

UnsupportedAnyOfBranch

An anyOf branch is not a supported union branch.

Error message: {context}.anyOf[{index}] must be a local component schema reference, inline string enum, inline primitive schema, or null schema

Fields

§context: String
§index: usize
§

UnsupportedOneOfSiblingKeyword

A oneOf schema combines a supported union with another schema keyword.

Error message: {context} uses oneOfwith{keyword}; only annotation siblings are supported

Fields

§context: String
§keyword: String
§

UnsupportedOneOfBranch

A oneOf branch is not a supported union branch.

Error message: {context}.oneOf[{index}] must be a local component schema reference, inline string enum, inline primitive schema, or null schema

Fields

§context: String
§index: usize
§

DuplicateUnionNullBranch

A plain anyOf or oneOf union has more than one null branch.

Error message: {context}.{keyword}[{index}] duplicates the union null branch

Fields

§context: String
§keyword: &'static str
§index: usize
§

DuplicateOpenStringEnumValue

An open string enum anyOf repeats an enum or const value across branches.

Error message: {context} declares duplicate open string enum value {value}acrossanyOf branches

Fields

§context: String
§value: String
§

NullableUnionWithoutVariants

A nullable plain anyOf or oneOf union has no non-null branches.

Error message: {context}.{keyword} must declare at least one non-null branch

Fields

§context: String
§keyword: &'static str
§

ShadowedUnionBranch

A plain anyOf or oneOf union has a branch that is statically shadowed by an earlier branch.

Error message: {context}.{keyword}[{index}] is shadowed by earlier branch {shadowed_by} under ordered serde untagged deserialization

Fields

§context: String
§keyword: &'static str
§index: usize
§shadowed_by: usize
§

EmptyAnyOf

A composition schema declares no branches.

Raised for empty anyOf and, today, for empty component allOf that is routed through the shared empty composition-shape check.

Error message: {context} must declare at least one anyOf branch

Fields

§context: String
§

RecursiveAnyOf

anyOf component schemas form a recursive union cycle.

Error message: {context} forms a recursive anyOfcycle through schema{schema}``

Fields

§context: String
§schema: String
§

InvalidDiscriminatorUnion

A discriminator union does not use exactly one non-empty anyOf or oneOf branch list.

Error message: {context} discriminator unions must declare exactly one non-empty anyOforoneOf branch list

Fields

§context: String
§

UnsupportedDiscriminatorBranch

A discriminator union branch is not a local component schema reference.

Error message: {context}.{keyword}[{index}] must be a local component schema reference when using discriminator``

Fields

§context: String
§keyword: &'static str
§index: usize
§

DiscriminatorBranchNotObject

A discriminator union branch target does not generate as an object struct.

Error message: {context} discriminator branch {schema} must be an object struct component

Fields

§context: String
§schema: String
§

DiscriminatorPropertyConflict

A discriminator branch object contains the discriminator property.

Error message: {context} discriminator branch {schema}contains discriminator property{property}``

Fields

§context: String
§schema: String
§property: String
§

InvalidDiscriminatorProperty

A discriminator branch object contains an invalid embedded discriminator property.

Error message: {context} discriminator branch {schema}property{property} must be {expected}

Fields

§context: String
§schema: String
§property: String
§expected: &'static str
§

InvalidDiscriminatorMapping

A discriminator mapping entry targets a non-local schema or a schema outside the union branches.

Error message: {context}.discriminator.mapping[{value:?}] targets {target}, which is not a local union branch schema

Fields

§context: String
§value: String
§target: String
§

DuplicateDiscriminatorMapping

Multiple discriminator mapping values target the same union branch schema.

Error message: {context}.discriminator.mapping maps multiple values to branch schema {schema}``

Fields

§context: String
§schema: String
§

DiscriminatorMappingValueMismatch

A discriminator mapping value disagrees with a branch’s embedded discriminator property value.

Error message: {context}.discriminator.mapping maps value {value}to branch schema{schema}, but the branch declares discriminator value {actual}`

Fields

§context: String
§schema: String
§value: String
§actual: String
§

DuplicateDiscriminatorValue

Multiple discriminator branches resolve to the same discriminator value after implicit defaults are applied.

Error message: {context}.discriminator resolves multiple branch schemas to value {value}``

Fields

§context: String
§value: String
§

InvalidStringLengthBounds

A string schema specifies a minLength greater than its maxLength.

Error message: {context} has minLength {min_length} greater than maxLength {max_length}

Fields

§context: String
§min_length: u64
§max_length: u64
§

UniqueItemsUnsupported

A schema uses uniqueItems, which cannot be enforced by generated Vec-backed types.

Error message: {context} uses uniqueItems; generated Vec-backed types cannot enforce uniqueness yet

Fields

§context: String
§

InvalidArrayLengthBounds

An array schema specifies minItems greater than maxItems.

Error message: {context} has minItems {min_items} greater than maxItems {max_items}

Fields

§context: String
§min_items: u64
§max_items: u64
§

UnsupportedKeyword

A schema uses a keyword that is not safely supported.

Error message: {context} uses {keyword}, which is not safely supported yet

Fields

§context: String
§keyword: &'static str
§

InvalidNonNegativeIntegerKeyword

A schema keyword that must be a non-negative integer has an invalid value.

Error message: {context}.{keyword} must be a non-negative integer

Fields

§context: String
§keyword: &'static str
§

InvalidBooleanKeyword

A schema keyword that must be a boolean has an invalid value.

Error message: {context}.{keyword} must be a boolean

Fields

§context: String
§keyword: &'static str
§

ExclusiveLimitRequiresBound

An exclusiveMinimum/exclusiveMaximum keyword is present but the corresponding bound is missing.

Error message: {context}.{exclusive_keyword} requires {keyword}``

Fields

§context: String
§exclusive_keyword: &'static str
§keyword: &'static str
§

InvalidFiniteNumberKeyword

A schema keyword that must be a finite number has a non-finite value.

Error message: {context}.{keyword} must be a finite number

Fields

§context: String
§keyword: &'static str
§

ExpectedInteger

A value expected to be an integer is not.

Error message: {context} must be an integer

Fields

§context: String
§

EmptyIntegerBounds

Integer bounds (minimum/maximum) do not permit any value.

Error message: {context} integer bounds do not allow any value

Fields

§context: String
§

ExclusiveIntegerMinimumOverflow

An exclusive integer minimum overflows i64.

Error message: exclusive integer minimum overflows

§

ExclusiveIntegerMaximumOverflow

An exclusive integer maximum overflows i64.

Error message: exclusive integer maximum overflows

§

EmptyNumberBounds

Number bounds (minimum/maximum) do not permit any value.

Error message: {context} number bounds do not allow any value

Fields

§context: String
§

MissingOperationResponses

An operation does not declare any responses.

Error message: operation {operation_id} must declare responses

Fields

§operation_id: String
§

ExpectedArray

A value expected to be an array is not.

Error message: {context} must be an array

Fields

§context: String
§

UnsupportedParameterLocation

A parameter uses an unsupported location (e.g. cookie) instead of path, query, or header.

Error message: {context} parameter {wire_name}is in{location}; only path, query, and header parameters are supported

Fields

§context: String
§wire_name: String
§location: String
§

ContentParameterUnsupported

A parameter uses content instead of schema.

Error message: {context} parameter {wire_name}usescontent; schema parameters are required

Fields

§context: String
§wire_name: String
§

MissingParameterSchema

A parameter is missing a required schema declaration.

Error message: {context} parameter {wire_name} must declare schema

Fields

§context: String
§wire_name: String
§

NullableParameterUnsupported

A parameter is nullable, which is not supported.

Error message: parameter {wire_name} is nullable; nullable parameters are not supported

Fields

§wire_name: String
§

AnyOfParameterUnsupported

A parameter uses anyOf, which is not supported for URI/header encoding yet.

Error message: parameter {wire_name}usesanyOf; anyOf parameters are not supported yet

Fields

§wire_name: String
§

MapParameterUnsupported

A parameter is a map or arbitrary JSON value, which has no URI/header encoding.

Error message: parameter {wire_name} is a map or JSON value; map parameters are not supported

Fields

§wire_name: String
§

ArrayPathParameterUnsupported

A path parameter is an array, which is not supported.

Error message: path parameter {wire_name} is an array; array path parameter styles are not supported

Fields

§wire_name: String
§

ArrayHeaderParameterUnsupported

A header parameter is an array, which is not supported.

Error message: header parameter {wire_name} is an array; array header parameter styles are not supported

Fields

§wire_name: String
§

PathParameterNotRequired

A path parameter does not set required: true.

Error message: path parameter {wire_name} must set required: true

Fields

§wire_name: String
§

MissingContent

A context is missing a required content declaration.

Error message: {context} must declare content

Fields

§context: String
§

MissingJsonContent

A context is missing the required application/json content type.

Error message: {context} must declare application/json content

Fields

§context: String
§

MissingJsonSchema

A context’s application/json content is missing a schema.

Error message: {context} application/json content must declare schema

Fields

§context: String
§

DefaultResponseBodyUnsupported

A response body uses the default status, which is not yet supported for decoding.

Error message: {context} contains a default response body; default response decoding is not supported yet

Fields

§context: String
§

InvalidStatusCode

A response contains an invalid HTTP status code string.

Error message: {context} contains invalid status code {status}``

Fields

§context: String
§status: String
§

OutOfRangeStatusCode

A response contains a status code outside the valid 100–599 range.

Error message: {context} contains out-of-range status code {status_code}``

Fields

§context: String
§status_code: u16
§

MissingResponseJsonContent

A response for a given status code is missing application/json content.

Error message: {context} {status} response must declare application/json content

Fields

§context: String
§status: String
§

UnclosedPathParameter

A path template contains a parameter that is never closed.

Error message: path {path} contains an unclosed parameter

Fields

§path: String
§

EmptyPathParameter

A path template contains an empty parameter (e.g. {}).

Error message: path {path} contains an empty parameter

Fields

§path: String
§

UndeclaredPathParameter

A path template references a parameter that is not declared in the operation’s parameters.

Error message: path {path}uses parameter{name} but it is not declared

Fields

§path: String
§name: String
§

UnusedPathParameter

A parameter is declared for a path but never used in the path template.

Error message: path parameter {name}is declared but not used in path{path}``

Fields

§path: String
§name: String
§

ResolveReference

A $ref could not be resolved because the referenced component failed validation.

Error message: failed to resolve reference {reference} in {context}: {source}

Fields

§reference: String
§context: String
§

NonLocalReference

A reference points to an external document; only local (#) references are supported.

Error message: only local references are supported

§

InvalidLocalReference

A local reference is not a valid JSON pointer.

Error message: local reference must be a JSON pointer

§

MissingJsonPointerToken

A JSON pointer is missing a required token segment.

Error message: missing {token}``

Fields

§token: String
§

InvalidComponentReference

A $ref does not point to the expected #/components/{section}/… path.

Error message: reference {reference} must point to #/components/{section}/...

Fields

§reference: String
§section: &'static str
§

CircularReference

A local $ref chain references itself.

Error message: circular reference {reference}``

Fields

§reference: String
§

ExpectedObject

A value expected to be an object is not.

Error message: {context} must be an object

Fields

§context: String
§

ExpectedObjectField

A nested field expected to be an object is not.

Error message: {context}.{field} must be an object

Fields

§context: String
§field: &'static str

Trait Implementations§

Source§

impl Debug for ValidationError

Source§

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

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

impl Display for ValidationError

Source§

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

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

impl Error for ValidationError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ValidationError> for Error

Source§

fn from(source: ValidationError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

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 T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

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

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more