#[non_exhaustive]
pub enum DataErrorKind {
Show 15 variants MissingResourceKey, MissingVariant, MissingLocale, MissingResourceOptions, NeedsVariant, NeedsLocale, ExtraneousResourceOptions, FilteredResource, MismatchedType(&'static str), MissingPayload, Mutex, InvalidState, Custom, Io(ErrorKind), MissingSourceData,
}
Expand description

A list specifying general categories of data provider error.

Errors may be caused either by a malformed request or by the data provider not being able to fulfill a well-formed request.

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.

MissingResourceKey

No data for the provided resource key.

MissingVariant

There is data for the key, but not for this particular variant.

MissingLocale

There is data for the key, but not for this particular locale.

MissingResourceOptions

There is data for the key, but not for this particular variant and/or locale.

NeedsVariant

The request should include a variant field.

NeedsLocale

The request should include a locale.

ExtraneousResourceOptions

The request should not contain a variant and/or locale.

FilteredResource

The resource was blocked by a filter. The resource may or may not be available.

MismatchedType(&'static str)

The generic type parameter does not match the TypeId. The expected type name is stored as context when this error is returned.

MissingPayload

The payload is missing. This is usually caused by a previous error.

Mutex

An error involving a lock or mutex occurred.

Check debug logs for potentially more information.

InvalidState

A data provider object was given to an operation in an invalid state.

Custom

An unspecified error occurred, such as a Serde error.

Check debug logs for potentially more information.

Io(ErrorKind)

An error occurred while accessing a system resource.

MissingSourceData

Implementations

Converts this DataErrorKind into a DataError.

If possible, you should attach context using a with_ function.

Creates a DataError with a resource key context.

Creates a DataError with a string context.

Creates a DataError with a type name context.

Creates a DataError with a request context.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Adds separators according to the given SeparatorPolicy. Read more

Inserts a comma every three digits from the right. Read more

Inserts a space every three digits from the right. Read more

Inserts a period every three digits from the right. Read more

Inserts an underscore every three digits from the right. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.