Enum icu_provider::DataError[][src]

#[non_exhaustive]
pub enum DataError {
    UnsupportedCategory(ResourceCategory),
    UnsupportedResourceKey(ResourceKey),
    UnavailableResourceOptions(DataRequest),
    NeedsLanguageIdentifier(DataRequest),
    NeedsTypeInfo,
    MissingPayload,
    MismatchedType {
        actual: Option<TypeId>,
        generic: Option<TypeId>,
    },
    Resource(Box<dyn Error>),
}

Variants (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.
UnsupportedCategory(ResourceCategory)

The data provider does not support the requested category.

UnsupportedResourceKey(ResourceKey)

The data provider supports the category, but not the key (sub-category or version).

UnavailableResourceOptions(DataRequest)

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

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.

Show fields

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.

Resource(Box<dyn Error>)

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

Implementations

impl Error[src]

pub fn new_resc_error<T>(err: T) -> Self where
    T: 'static + Error
[src]

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl From<&'_ ResourceCategory> for Error[src]

impl From<&'_ ResourceKey> for Error[src]

impl From<Box<dyn Error + 'static, Global>> for Error[src]

impl From<DataRequest> for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl !Send for Error

impl !Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

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> From<T> for T[src]

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

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.