#[non_exhaustive]pub enum WriteError {
Nul(String),
UnknownVariable {
message: usize,
name: String,
},
UnknownFunction {
message: usize,
name: String,
},
InputName {
message: usize,
name: String,
variable: String,
},
Unsupported {
message: usize,
},
Manifest(&'static str),
Dir,
LocaleEntry(u32),
Fallback(&'static str),
TooLarge(&'static str),
Internal(&'static str),
}writer only.Expand description
Why the writer refused a catalog (plans/02-catalog-format.md §2.9).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Nul(String)
A string contains U+0000, which has no syntax form and no catalog form.
UnknownVariable
A variable is neither a local in scope nor in the message’s slot list.
Fields
UnknownFunction
A function is not in the manifest’s function set.
InputName
An .input declaration whose name differs from its variable’s.
Fields
Unsupported
A data-model node this format version cannot represent.
Manifest(&'static str)
The manifest and the messages do not fit together, or the manifest’s lists are not strictly ascending.
Dir
The header direction must be ltr or rtl.
LocaleEntry(u32)
A LOCALE entry is duplicated or malformed.
Fallback(&'static str)
A fallback entry names a message twice or out of range, or there are more than 256 fallback locales.
TooLarge(&'static str)
Beyond the format’s limits (2²⁴ messages, 2³⁰ bytes of MESSAGES or STRINGS, 2³² for counts).
Internal(&'static str)
A writer bug: the two passes disagreed.
Trait Implementations§
Source§impl Clone for WriteError
impl Clone for WriteError
Source§impl Debug for WriteError
impl Debug for WriteError
Source§impl Display for WriteError
impl Display for WriteError
impl Eq for WriteError
Source§impl Error for WriteError
impl Error for WriteError
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()