#[non_exhaustive]pub enum Error {
MissingOutDir,
InvalidCratePath(String),
InvalidFallbackLocale {
locale: String,
reason: String,
},
MissingFallbackLocale {
locale: String,
locales_dir: PathBuf,
available: Vec<String>,
},
Io {
path: PathBuf,
source: Error,
},
DuplicateId {
id: String,
lang: String,
first: (PathBuf, usize),
second: (PathBuf, usize),
},
Parse {
path: PathBuf,
message: String,
},
MissingTranslations {
report: Vec<String>,
},
}Expand description
Why FluentZeroBuilder::try_generate failed.
FluentZeroBuilder::generate panics with this error’s Display text,
prefixed with fluent-zero-build: .
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MissingOutDir
The OUT_DIR environment variable is not set, i.e. the builder is not
running inside a Cargo build script.
InvalidCratePath(String)
The path given to FluentZeroBuilder::crate_path is not a Rust path.
InvalidFallbackLocale
The locale given to FluentZeroBuilder::fallback_locale is not a
valid language identifier.
MissingFallbackLocale
The locales directory holds locales, but none of them is the configured fallback locale.
Fields
Io
Reading a locale file or writing generated output failed.
Fields
DuplicateId
A message or term ID is defined more than once within one locale.
Fields
Parse
An .ftl file contains syntax errors.
Fields
MissingTranslations
Translations are missing under MissingTranslations::Deny.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
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
Mutably borrows from an owned value. Read more