#[non_exhaustive]pub enum Error {
Parse(ParseError),
Rule {
kind: &'static str,
locale: String,
category: String,
source: ParseError,
},
Table {
line: usize,
message: String,
},
Pattern {
pattern: String,
message: &'static str,
},
Missing {
locale: String,
system: String,
field: &'static str,
},
Entry(WriteError),
Json(Error),
Shape(String),
Assumption(String),
Io {
path: PathBuf,
source: Error,
},
IcuData(DataError),
IcuBlobBuild {
locale: String,
count: usize,
first: String,
},
}Expand description
A problem with the shipped rule table or the CLDR input.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Parse(ParseError)
A plural rule does not parse.
Rule
A plural rule of the shipped table does not parse.
Fields
source: ParseErrorWhy.
Table
A line of a shipped table is malformed.
Pattern
A CLDR number pattern the encoder does not accept.
Missing
A locale’s number data lacks a field.
Fields
Entry(WriteError)
The catalog writer refused a LOCALE entry.
Json(Error)
extract only.The CLDR JSON does not parse (extract).
Shape(String)
extract only.The CLDR JSON is not shaped as expected (extract).
Assumption(String)
extract only.The CLDR input breaks an assumption the table format rests on (the extractor checks each one, so a CLDR update that changes them is noticed, not silently mis-encoded).
Io
extract only.A file could not be read or written (extract).
IcuData(DataError)
icu-blob only.ICU4X data for icu.blob (icu-blob).
IcuBlobBuild
icu-blob only.Some formatter of the datetime-icu backend does not build from
ICU4X’s data for the locale (icu-blob).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<WriteError> for Error
impl From<WriteError> for Error
Source§fn from(source: WriteError) -> Self
fn from(source: WriteError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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