#[non_exhaustive]pub enum Error {
Show 16 variants
Io {
path: PathBuf,
source: Error,
},
Config {
path: PathBuf,
message: String,
},
Json {
path: PathBuf,
line: u32,
column: u32,
message: String,
},
Locale {
locale: String,
source: Error,
},
Write {
locale: String,
source: WriteError,
},
LocaleData(Error),
Manifest(ManifestError),
Catalog(WriteError),
Compress {
locale: String,
format: &'static str,
source: Error,
},
Layout(String),
LocaleVariant {
first: String,
second: String,
variant: String,
},
MarkupHash {
first: String,
second: String,
},
Corpus {
errors: usize,
locales: usize,
},
NoMf2,
Mf2Version {
mf2: String,
build: String,
},
IcuBlob,
}Expand description
What stops a build.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
A file could not be read or written.
Config
mf2.toml is not valid TOML, or a key in it is wrong.
Json
A flat JSON corpus is not an object of strings.
Fields
Locale
The locale directory names a tag the catalog format cannot write.
Write
The catalog writer refused a locale’s messages.
LocaleData(Error)
The locale data could not be sliced.
Manifest(ManifestError)
The manifest could not be written or read back.
Catalog(WriteError)
A catalog could not be written.
Compress
A catalog could not be compressed.
Both encoders write into a Vec, so this is a compressor fault, not a
full disk. It is still an error rather than a shrug: a truncated
.br would be served immutable beside a .mf2b whose content hash
says it is intact, and the client would see a corrupt catalog.
Fields
Layout(String)
The layout on disk is not what a build needs.
LocaleVariant
Two locales’ tags give the generated Locale one variant: pt-BR
and pt_br are both Locale::PtBr.
Fields
MarkupHash
Two markup names have one hash, so a style could not tell them apart.
Corpus
The build found errors in the corpus; they are in the report.
NoMf2
run cannot see mf2’s features: cargo passes them
only to a crate that names mf2 as a normal dependency.
Mf2Version
mf2 and mf2-build are not the same version.
IcuBlob
mf2 has datetime-icu, and this mf2-build was built without
icu-blob, which writes ICU4X’s date data into the catalogs. A
build-dependency’s features cannot come through links.
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<ManifestError> for Error
impl From<ManifestError> for Error
Source§fn from(source: ManifestError) -> Self
fn from(source: ManifestError) -> 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