Enum icu::compactdecimal::Error
source · #[non_exhaustive]
pub enum Error {
PluralRules(PluralsError),
Data(DataError),
Decimal(DecimalError),
Exponent {
actual: i16,
expected: i16,
log10_type: i16,
},
}
Expand description
A list of error outcomes for various operations in this module.
Re-exported as Error
.
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.
PluralRules(PluralsError)
An error originating from PluralRules
.
Data(DataError)
An error originating from DataProvider
.
Decimal(DecimalError)
An error originating from FixedDecimalFormatter
.
Exponent
Fields
An error due to a CompactDecimal
with an
exponent inconsistent with the compact decimal data for the locale, e.g.,
when formatting 1c5 in English (US).
Trait Implementations§
source§impl Clone for CompactDecimalError
impl Clone for CompactDecimalError
source§fn clone(&self) -> CompactDecimalError
fn clone(&self) -> CompactDecimalError
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 CompactDecimalError
impl Debug for CompactDecimalError
source§impl Display for CompactDecimalError
impl Display for CompactDecimalError
source§impl From<DataError> for CompactDecimalError
impl From<DataError> for CompactDecimalError
source§fn from(e: DataError) -> CompactDecimalError
fn from(e: DataError) -> CompactDecimalError
Converts to this type from the input type.
source§impl From<DecimalError> for CompactDecimalError
impl From<DecimalError> for CompactDecimalError
source§fn from(e: DecimalError) -> CompactDecimalError
fn from(e: DecimalError) -> CompactDecimalError
Converts to this type from the input type.
source§impl From<PluralsError> for CompactDecimalError
impl From<PluralsError> for CompactDecimalError
source§fn from(e: PluralsError) -> CompactDecimalError
fn from(e: PluralsError) -> CompactDecimalError
Converts to this type from the input type.
source§impl PartialEq<CompactDecimalError> for CompactDecimalError
impl PartialEq<CompactDecimalError> for CompactDecimalError
source§fn eq(&self, other: &CompactDecimalError) -> bool
fn eq(&self, other: &CompactDecimalError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.