Enum icu::datetime::pattern::PatternLoadError
source · #[non_exhaustive]pub enum PatternLoadError {
ConflictingField(Field),
UnsupportedLength(Field),
TypeTooSpecific(Field),
Data(DataError, Field),
}
Expand description
Error returned from TypedDateTimeNames
’s pattern load methods.
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.
ConflictingField(Field)
A field conflicts with a previous field.
Fields conflict if they require the same type of data, for example the
EEE
and EEEE
fields (short vs long weekday) conflict, or the M
and L
(format vs standalone month) conflict.
UnsupportedLength(Field)
The field symbol is not supported in that length.
Some fields, such as O
are not defined for all lengths (e.g. OO
).
TypeTooSpecific(Field)
The specific type does not support this field.
This happens for example when trying to load a month field
on a TypedDateTimeNames<Gregorian, ZoneFieldSet>
.
Data(DataError, Field)
An error arising from the data provider
for loading names.
Trait Implementations§
source§impl Clone for PatternLoadError
impl Clone for PatternLoadError
source§fn clone(&self) -> PatternLoadError
fn clone(&self) -> PatternLoadError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PatternLoadError
impl Debug for PatternLoadError
source§impl Display for PatternLoadError
impl Display for PatternLoadError
source§impl PartialEq for PatternLoadError
impl PartialEq for PatternLoadError
impl Copy for PatternLoadError
impl StructuralPartialEq for PatternLoadError
Auto Trait Implementations§
impl Freeze for PatternLoadError
impl RefUnwindSafe for PatternLoadError
impl Send for PatternLoadError
impl Sync for PatternLoadError
impl Unpin for PatternLoadError
impl UnwindSafe for PatternLoadError
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
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>
Converts
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>
Converts
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