Enum icu_capi::errors::ffi::ICU4XError
source · #[repr(C)]pub enum ICU4XError {
Show 56 variants
UnknownError = 0,
WriteableError = 1,
OutOfBoundsError = 2,
Utf8Error = 3,
DataMissingDataKeyError = 256,
DataMissingVariantError = 257,
DataMissingLocaleError = 258,
DataNeedsVariantError = 259,
DataNeedsLocaleError = 260,
DataExtraneousLocaleError = 261,
DataFilteredResourceError = 262,
DataMismatchedTypeError = 263,
DataMissingPayloadError = 264,
DataInvalidStateError = 265,
DataCustomError = 266,
DataIoError = 267,
DataUnavailableBufferFormatError = 268,
DataMismatchedAnyBufferError = 269,
LocaleUndefinedSubtagError = 512,
LocaleParserLanguageError = 513,
LocaleParserSubtagError = 514,
LocaleParserExtensionError = 515,
DataStructValidityError = 768,
PropertyUnknownScriptIdError = 1_024,
PropertyUnknownGeneralCategoryGroupError = 1_025,
PropertyUnexpectedPropertyNameError = 1_026,
FixedDecimalLimitError = 1_280,
FixedDecimalSyntaxError = 1_281,
PluralsParserError = 1_536,
CalendarParseError = 1_792,
CalendarOverflowError = 1_793,
CalendarUnderflowError = 1_794,
CalendarOutOfRangeError = 1_795,
CalendarUnknownEraError = 1_796,
CalendarUnknownMonthCodeError = 1_797,
CalendarMissingInputError = 1_798,
CalendarUnknownKindError = 1_799,
CalendarMissingError = 1_800,
DateTimePatternError = 2_048,
DateTimeMissingInputFieldError = 2_049,
DateTimeSkeletonError = 2_050,
DateTimeUnsupportedFieldError = 2_051,
DateTimeUnsupportedOptionsError = 2_052,
DateTimeMissingWeekdaySymbolError = 2_053,
DateTimeMissingMonthSymbolError = 2_054,
DateTimeFixedDecimalError = 2_055,
DateTimeMismatchedCalendarError = 2_056,
TinyStrTooLargeError = 2_304,
TinyStrContainsNullError = 2_305,
TinyStrNonAsciiError = 2_306,
TimeZoneOffsetOutOfBoundsError = 2_560,
TimeZoneInvalidOffsetError = 2_561,
TimeZoneMissingInputError = 2_562,
TimeZoneInvalidIdError = 2_563,
NormalizerFutureExtensionError = 2_816,
NormalizerValidationError = 2_817,
}
Expand description
A common enum for errors that ICU4X may return, organized by API
The error names are stable and can be checked against as strings in the JS API
Variants§
UnknownError = 0
The error is not currently categorized as ICU4XError. Please file a bug
WriteableError = 1
An error arising from writing to a string Typically found when not enough space is allocated Most APIs that return a string may return this error
OutOfBoundsError = 2
Some input was out of bounds
Utf8Error = 3
Input expected to be UTF-8 was ill-formed
DataMissingDataKeyError = 256
DataMissingVariantError = 257
DataMissingLocaleError = 258
DataNeedsVariantError = 259
DataNeedsLocaleError = 260
DataExtraneousLocaleError = 261
DataFilteredResourceError = 262
DataMismatchedTypeError = 263
DataMissingPayloadError = 264
DataInvalidStateError = 265
DataCustomError = 266
DataIoError = 267
DataMismatchedAnyBufferError = 269
LocaleUndefinedSubtagError = 512
The subtag being requested was not set
LocaleParserLanguageError = 513
The locale or subtag string failed to parse
LocaleParserSubtagError = 514
LocaleParserExtensionError = 515
DataStructValidityError = 768
Attempted to construct an invalid data struct
PropertyUnknownScriptIdError = 1_024
PropertyUnknownGeneralCategoryGroupError = 1_025
PropertyUnexpectedPropertyNameError = 1_026
FixedDecimalLimitError = 1_280
FixedDecimalSyntaxError = 1_281
PluralsParserError = 1_536
CalendarParseError = 1_792
CalendarOverflowError = 1_793
CalendarUnderflowError = 1_794
CalendarOutOfRangeError = 1_795
CalendarUnknownEraError = 1_796
CalendarUnknownMonthCodeError = 1_797
CalendarMissingInputError = 1_798
CalendarUnknownKindError = 1_799
CalendarMissingError = 1_800
DateTimePatternError = 2_048
DateTimeMissingInputFieldError = 2_049
DateTimeSkeletonError = 2_050
DateTimeUnsupportedFieldError = 2_051
DateTimeUnsupportedOptionsError = 2_052
DateTimeMissingWeekdaySymbolError = 2_053
DateTimeMissingMonthSymbolError = 2_054
DateTimeFixedDecimalError = 2_055
DateTimeMismatchedCalendarError = 2_056
TinyStrTooLargeError = 2_304
TinyStrContainsNullError = 2_305
TinyStrNonAsciiError = 2_306
TimeZoneOffsetOutOfBoundsError = 2_560
TimeZoneInvalidOffsetError = 2_561
TimeZoneMissingInputError = 2_562
TimeZoneInvalidIdError = 2_563
NormalizerFutureExtensionError = 2_816
NormalizerValidationError = 2_817
Implementations§
source§impl ICU4XError
impl ICU4XError
pub(crate) fn log_original<T: Display + ?Sized>(self, e: &T) -> Self
Trait Implementations§
source§impl Clone for ICU4XError
impl Clone for ICU4XError
source§fn clone(&self) -> ICU4XError
fn clone(&self) -> ICU4XError
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 ICU4XError
impl Debug for ICU4XError
source§impl From<CalendarError> for ICU4XError
impl From<CalendarError> for ICU4XError
source§fn from(e: CalendarError) -> Self
fn from(e: CalendarError) -> Self
Converts to this type from the input type.
source§impl From<CollatorError> for ICU4XError
impl From<CollatorError> for ICU4XError
source§fn from(e: CollatorError) -> Self
fn from(e: CollatorError) -> Self
Converts to this type from the input type.
source§impl From<DataError> for ICU4XError
impl From<DataError> for ICU4XError
source§impl From<DateTimeError> for ICU4XError
impl From<DateTimeError> for ICU4XError
source§fn from(e: DateTimeError) -> Self
fn from(e: DateTimeError) -> Self
Converts to this type from the input type.
source§impl From<DecimalError> for ICU4XError
impl From<DecimalError> for ICU4XError
source§fn from(e: DecimalError) -> Self
fn from(e: DecimalError) -> Self
Converts to this type from the input type.
source§impl From<Error> for ICU4XError
impl From<Error> for ICU4XError
source§impl From<FixedDecimalError> for ICU4XError
impl From<FixedDecimalError> for ICU4XError
source§fn from(e: FixedDecimalError) -> Self
fn from(e: FixedDecimalError) -> Self
Converts to this type from the input type.
source§impl From<ListError> for ICU4XError
impl From<ListError> for ICU4XError
source§impl From<LocaleTransformError> for ICU4XError
impl From<LocaleTransformError> for ICU4XError
source§fn from(e: LocaleTransformError) -> Self
fn from(e: LocaleTransformError) -> Self
Converts to this type from the input type.
source§impl From<NormalizerError> for ICU4XError
impl From<NormalizerError> for ICU4XError
source§fn from(e: NormalizerError) -> Self
fn from(e: NormalizerError) -> Self
Converts to this type from the input type.
source§impl From<ParserError> for ICU4XError
impl From<ParserError> for ICU4XError
source§fn from(e: ParserError) -> Self
fn from(e: ParserError) -> Self
Converts to this type from the input type.
source§impl From<PluralsError> for ICU4XError
impl From<PluralsError> for ICU4XError
source§fn from(e: PluralsError) -> Self
fn from(e: PluralsError) -> Self
Converts to this type from the input type.
source§impl From<PropertiesError> for ICU4XError
impl From<PropertiesError> for ICU4XError
source§fn from(e: PropertiesError) -> Self
fn from(e: PropertiesError) -> Self
Converts to this type from the input type.
source§impl From<SegmenterError> for ICU4XError
impl From<SegmenterError> for ICU4XError
source§fn from(e: SegmenterError) -> Self
fn from(e: SegmenterError) -> Self
Converts to this type from the input type.
source§impl From<TimeZoneError> for ICU4XError
impl From<TimeZoneError> for ICU4XError
source§fn from(e: TimeZoneError) -> Self
fn from(e: TimeZoneError) -> Self
Converts to this type from the input type.
source§impl From<Utf8Error> for ICU4XError
impl From<Utf8Error> for ICU4XError
source§impl PartialEq for ICU4XError
impl PartialEq for ICU4XError
source§fn eq(&self, other: &ICU4XError) -> bool
fn eq(&self, other: &ICU4XError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ICU4XError
impl Eq for ICU4XError
impl StructuralPartialEq for ICU4XError
Auto Trait Implementations§
impl Freeze for ICU4XError
impl RefUnwindSafe for ICU4XError
impl Send for ICU4XError
impl Sync for ICU4XError
impl Unpin for ICU4XError
impl UnwindSafe for ICU4XError
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> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
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