#[non_exhaustive]#[repr(u8)]pub enum CatalogError {
Show 14 variants
Magic = 0,
Version = 1,
ManifestMismatch = 2,
Truncated = 3,
Header = 4,
SectionTable = 5,
MissingSection = 6,
Index = 7,
Locale = 8,
Funcs = 9,
Fallback = 10,
Names = 11,
Ids = 12,
Strings = 13,
}Expand description
Why crate::Catalog::new rejected a buffer (F4, F6, F9).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Magic = 0
Not an .mf2b file: the magic bytes are missing or wrong.
Version = 1
A major format version this reader does not know (F9).
ManifestMismatch = 2
Compiled against another manifest: the wasm and the catalog disagree on ids, slots, markup or functions (F6). Reload.
Truncated = 3
The buffer ends inside the header or the section table.
Header = 4
A header field is invalid: message count, direction or the locale tag.
SectionTable = 5
Sections out of bounds, out of order or overlapping, a known kind twice, or STRINGS not last.
MissingSection = 6
A required section is missing.
Index = 7
INDEX has the wrong size or an entry out of bounds or out of order.
Locale = 8
The LOCALE container or one of its plural entries is malformed.
Funcs = 9
FUNCS is malformed.
Fallback = 10
FALLBACK is malformed.
Names = 11
NAMES is malformed.
Ids = 12
IDS is malformed.
Strings = 13
STRINGS does not end with a NUL byte.
Trait Implementations§
Source§impl Clone for CatalogError
impl Clone for CatalogError
impl Copy for CatalogError
Source§impl Debug for CatalogError
impl Debug for CatalogError
Source§impl Display for CatalogError
impl Display for CatalogError
impl Eq for CatalogError
Source§impl Error for CatalogError
impl Error for CatalogError
1.30.0 · 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()