#[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
Trait Implementations§
Source§impl Clone for ICU4XError
impl Clone for ICU4XError
Source§fn clone(&self) -> ICU4XError
fn clone(&self) -> ICU4XError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl From<DataError> for ICU4XError
impl From<DataError> for ICU4XError
Source§impl From<Error> for ICU4XError
impl From<Error> for ICU4XError
Source§impl From<ParserError> for ICU4XError
impl From<ParserError> for ICU4XError
Source§fn from(e: ParserError) -> Self
fn from(e: ParserError) -> Self
Source§impl From<PropertiesError> for ICU4XError
impl From<PropertiesError> for ICU4XError
Source§fn from(e: PropertiesError) -> Self
fn from(e: PropertiesError) -> Self
Source§impl From<SegmenterError> for ICU4XError
impl From<SegmenterError> for ICU4XError
Source§fn from(e: SegmenterError) -> Self
fn from(e: SegmenterError) -> Self
Source§impl From<Utf8Error> for ICU4XError
impl From<Utf8Error> for ICU4XError
Source§impl PartialEq for ICU4XError
impl PartialEq for ICU4XError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes
Size for each variant:
UnknownError: 0 bytesWriteableError: 0 bytesOutOfBoundsError: 0 bytesUtf8Error: 0 bytesDataMissingDataKeyError: 0 bytesDataMissingVariantError: 0 bytesDataMissingLocaleError: 0 bytesDataNeedsVariantError: 0 bytesDataNeedsLocaleError: 0 bytesDataExtraneousLocaleError: 0 bytesDataFilteredResourceError: 0 bytesDataMismatchedTypeError: 0 bytesDataMissingPayloadError: 0 bytesDataInvalidStateError: 0 bytesDataCustomError: 0 bytesDataIoError: 0 bytesDataUnavailableBufferFormatError: 0 bytesDataMismatchedAnyBufferError: 0 bytesLocaleUndefinedSubtagError: 0 bytesLocaleParserLanguageError: 0 bytesLocaleParserSubtagError: 0 bytesLocaleParserExtensionError: 0 bytesDataStructValidityError: 0 bytesPropertyUnknownScriptIdError: 0 bytesPropertyUnknownGeneralCategoryGroupError: 0 bytesPropertyUnexpectedPropertyNameError: 0 bytesFixedDecimalLimitError: 0 bytesFixedDecimalSyntaxError: 0 bytesPluralsParserError: 0 bytesCalendarParseError: 0 bytesCalendarOverflowError: 0 bytesCalendarUnderflowError: 0 bytesCalendarOutOfRangeError: 0 bytesCalendarUnknownEraError: 0 bytesCalendarUnknownMonthCodeError: 0 bytesCalendarMissingInputError: 0 bytesCalendarUnknownKindError: 0 bytesCalendarMissingError: 0 bytesDateTimePatternError: 0 bytesDateTimeMissingInputFieldError: 0 bytesDateTimeSkeletonError: 0 bytesDateTimeUnsupportedFieldError: 0 bytesDateTimeUnsupportedOptionsError: 0 bytesDateTimeMissingWeekdaySymbolError: 0 bytesDateTimeMissingMonthSymbolError: 0 bytesDateTimeFixedDecimalError: 0 bytesDateTimeMismatchedCalendarError: 0 bytesTinyStrTooLargeError: 0 bytesTinyStrContainsNullError: 0 bytesTinyStrNonAsciiError: 0 bytesTimeZoneOffsetOutOfBoundsError: 0 bytesTimeZoneInvalidOffsetError: 0 bytesTimeZoneMissingInputError: 0 bytesTimeZoneInvalidIdError: 0 bytesNormalizerFutureExtensionError: 0 bytesNormalizerValidationError: 0 bytes