Enum icu_provider::DataError[][src]

#[non_exhaustive]
pub enum DataError {
    MissingResourceKey(ResourceKey),
    MissingResourceOptions(DataRequest),
    FilteredResource(DataRequestString),
    NeedsLanguageIdentifier(DataRequest),
    NeedsTypeInfo,
    MissingPayload,
    MismatchedType {
        actual: Option<TypeId>,
        generic: Option<TypeId>,
    },
    MultipleReferences,
    Serde(Error),
    Resource(String),
}
Expand description

Error enumeration for DataProvider.

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(ResourceKey)

The data provider does not support the resource key.

MissingResourceOptions(DataRequest)

The data provider supports the key, but does not have data for the specific entry.

FilteredResource(DataRequestString)

The resource was not returned due to a filter. The resource may or may not be available.

NeedsLanguageIdentifier(DataRequest)

The data provider supports the key, but it requires a language identifier, which was missing from the request.

NeedsTypeInfo

The operation cannot be completed without more type information. For example, data cannot be deserialized without the concrete type.

MissingPayload

The payload is missing. This error is usually unexpected.

MismatchedType

The TypeID of the payload does not match the expected TypeID.

Fields of MismatchedType

actual: Option<TypeId>

The actual TypeID of the payload, if available.

generic: Option<TypeId>

The expected TypeID derived from the generic type parameter at the call site.

MultipleReferences

The requested operation failed to unwrap an Rc backing the data payload.

Serde(Error)

An error occured during serialization or deserialization.

Resource(String)

The data provider encountered some other error when loading the resource, such as I/O.

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

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

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

Clone this trait object reference, returning a boxed trait object.

Return this boxed trait object as Box<dyn Any>. Read more

Return this trait object reference as &dyn Any. Read more

Performs the conversion.

Performs the conversion.

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.