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

§

DataUnavailableBufferFormatError = 268

§

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

source

pub(crate) fn log_original<T: Display + ?Sized>(self, e: &T) -> Self

Trait Implementations§

source§

impl Clone for ICU4XError

source§

fn clone(&self) -> ICU4XError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ICU4XError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<CalendarError> for ICU4XError

source§

fn from(e: CalendarError) -> Self

Converts to this type from the input type.
source§

impl From<CollatorError> for ICU4XError

source§

fn from(e: CollatorError) -> Self

Converts to this type from the input type.
source§

impl From<DataError> for ICU4XError

source§

fn from(e: DataError) -> Self

Converts to this type from the input type.
source§

impl From<DateTimeError> for ICU4XError

source§

fn from(e: DateTimeError) -> Self

Converts to this type from the input type.
source§

impl From<DecimalError> for ICU4XError

source§

fn from(e: DecimalError) -> Self

Converts to this type from the input type.
source§

impl From<Error> for ICU4XError

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<FixedDecimalError> for ICU4XError

source§

fn from(e: FixedDecimalError) -> Self

Converts to this type from the input type.
source§

impl From<ListError> for ICU4XError

source§

fn from(e: ListError) -> Self

Converts to this type from the input type.
source§

impl From<LocaleTransformError> for ICU4XError

source§

fn from(e: LocaleTransformError) -> Self

Converts to this type from the input type.
source§

impl From<NormalizerError> for ICU4XError

source§

fn from(e: NormalizerError) -> Self

Converts to this type from the input type.
source§

impl From<ParserError> for ICU4XError

source§

fn from(e: ParserError) -> Self

Converts to this type from the input type.
source§

impl From<PluralsError> for ICU4XError

source§

fn from(e: PluralsError) -> Self

Converts to this type from the input type.
source§

impl From<PropertiesError> for ICU4XError

source§

fn from(e: PropertiesError) -> Self

Converts to this type from the input type.
source§

impl From<SegmenterError> for ICU4XError

source§

fn from(e: SegmenterError) -> Self

Converts to this type from the input type.
source§

impl From<TimeZoneError> for ICU4XError

source§

fn from(e: TimeZoneError) -> Self

Converts to this type from the input type.
source§

impl From<Utf8Error> for ICU4XError

source§

fn from(_: Utf8Error) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ICU4XError

source§

fn eq(&self, other: &ICU4XError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for ICU4XError

source§

impl Eq for ICU4XError

source§

impl StructuralPartialEq for ICU4XError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Filterable for T

source§

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T