Enum icu_provider::DataErrorKind
source · #[non_exhaustive]pub enum DataErrorKind {
MarkerNotFound,
IdentifierNotFound,
InvalidRequest,
InconsistentData(DataMarkerInfo),
Downcast(&'static str),
Deserialize,
Custom,
Io(ErrorKind),
}
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
MarkerNotFound
No data for the requested data marker. This is only returned by DynamicDataProvider
.
IdentifierNotFound
There is data for the data marker, but not for this particular data identifier.
InvalidRequest
The request is invalid, such as a request for a singleton marker containing a data identifier.
InconsistentData(DataMarkerInfo)
The data for two DataMarker
s is not consistent.
Downcast(&'static str)
An error occured during Any
downcasting.
Deserialize
An error occured during serde
deserialization.
Check debug logs for potentially more information.
Custom
An unspecified error occurred.
Check debug logs for potentially more information.
Io(ErrorKind)
An error occurred while accessing a system resource.
Implementations§
source§impl 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_marker(self, marker: DataMarkerInfo) -> DataError
pub const fn with_marker(self, marker: DataMarkerInfo) -> DataError
Creates a DataError with a data marker 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, marker: DataMarkerInfo, req: DataRequest<'_>) -> DataError
pub fn with_req(self, marker: DataMarkerInfo, req: DataRequest<'_>) -> DataError
Creates a DataError with a request context.
Trait Implementations§
source§impl Clone for DataErrorKind
impl Clone for DataErrorKind
source§fn clone(&self) -> DataErrorKind
fn clone(&self) -> DataErrorKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DataErrorKind
impl Debug for DataErrorKind
source§impl Display for DataErrorKind
impl Display for DataErrorKind
source§impl PartialEq for DataErrorKind
impl PartialEq for DataErrorKind
impl Copy for DataErrorKind
impl Eq for DataErrorKind
impl StructuralPartialEq for DataErrorKind
Auto Trait Implementations§
impl Freeze for DataErrorKind
impl RefUnwindSafe for DataErrorKind
impl Send for DataErrorKind
impl Sync for DataErrorKind
impl Unpin for DataErrorKind
impl UnwindSafe for DataErrorKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more