Enum icu_provider::prelude::DataErrorKind
source · [−]#[non_exhaustive]
pub enum DataErrorKind {
}
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
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
sourceimpl DataErrorKind
impl DataErrorKind
sourcepub const fn into_error(self) -> DataError
pub const fn into_error(self) -> DataError
Converts this DataErrorKind into a DataError.
If possible, you should attach context using a with_
function.
sourcepub const fn with_key(self, key: ResourceKey) -> DataError
pub const fn with_key(self, key: ResourceKey) -> DataError
Creates a DataError with a resource key context.
sourcepub const fn with_str_context(self, context: &'static str) -> DataError
pub const fn with_str_context(self, context: &'static str) -> DataError
Creates a DataError with a string context.
sourcepub fn with_type_context<T>(self) -> DataError
pub fn with_type_context<T>(self) -> DataError
Creates a DataError with a type name context.
sourcepub fn with_req(self, key: ResourceKey, req: &DataRequest) -> DataError
pub fn with_req(self, key: ResourceKey, req: &DataRequest) -> DataError
Creates a DataError with a request context.
Trait Implementations
sourceimpl Clone for DataErrorKind
impl Clone for DataErrorKind
sourcefn clone(&self) -> DataErrorKind
fn clone(&self) -> DataErrorKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DataErrorKind
impl Debug for DataErrorKind
sourceimpl Display for DataErrorKind
impl Display for DataErrorKind
sourceimpl PartialEq<DataErrorKind> for DataErrorKind
impl PartialEq<DataErrorKind> for DataErrorKind
sourcefn eq(&self, other: &DataErrorKind) -> bool
fn eq(&self, other: &DataErrorKind) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DataErrorKind) -> bool
fn ne(&self, other: &DataErrorKind) -> bool
This method tests for !=
.
impl Copy for DataErrorKind
impl Eq for DataErrorKind
impl StructuralEq for DataErrorKind
impl StructuralPartialEq for DataErrorKind
Auto Trait Implementations
impl RefUnwindSafe for DataErrorKind
impl Send for DataErrorKind
impl Sync for DataErrorKind
impl Unpin for DataErrorKind
impl UnwindSafe for DataErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Separable for T where
T: Display,
impl<T> Separable for T where
T: Display,
sourcefn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
Adds separators according to the given SeparatorPolicy
. Read more
sourcefn separate_with_commas(&self) -> String
fn separate_with_commas(&self) -> String
Inserts a comma every three digits from the right. Read more
sourcefn separate_with_spaces(&self) -> String
fn separate_with_spaces(&self) -> String
Inserts a space every three digits from the right. Read more
sourcefn separate_with_dots(&self) -> String
fn separate_with_dots(&self) -> String
Inserts a period every three digits from the right. Read more
sourcefn separate_with_underscores(&self) -> String
fn separate_with_underscores(&self) -> String
Inserts an underscore every three digits from the right. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more