#[non_exhaustive]pub enum BuildError {
FtlParse {
path: PathBuf,
errors: Vec<String>,
},
FtlRead {
path: PathBuf,
source: Error,
},
DuplicateKey {
key: String,
original: PathBuf,
original_line: usize,
duplicate: PathBuf,
duplicate_line: usize,
},
TermMessageCollision {
name: String,
term_file: PathBuf,
term_line: usize,
message_file: PathBuf,
message_line: usize,
},
LocalesFolder {
folder: String,
source: Error,
},
NoLocaleFolders {
folder: String,
},
DefaultLanguageNotFound {
language: String,
folder: String,
},
Lint {
messages: Vec<String>,
},
WriteOutput {
path: String,
source: Error,
},
Rustfmt(String),
Generation(String),
Multiple(Vec<BuildError>),
}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.
FtlParse
Fields
FtlRead
DuplicateKey
TermMessageCollision
A term and a message share the same bare name (e.g. -foo and foo).
fluent-bundle stores both under the same key, so loading the resource
crashes at runtime with FluentError::Overriding. Detected at build
time so the cliff never happens.
LocalesFolder
NoLocaleFolders
DefaultLanguageNotFound
Lint
One or more lint diagnostics, raised as a hard error under
crate::LintLevel::Deny or crate::LintLevel::Strict. Each entry
already carries file:line.
WriteOutput
Rustfmt(String)
Generation(String)
Multiple(Vec<BuildError>)
Several independent build errors, collected so they can all be fixed in one pass instead of one rebuild at a time.
Trait Implementations§
Source§impl Debug for BuildError
impl Debug for BuildError
Source§impl Display for BuildError
impl Display for BuildError
Source§impl Error for BuildError
impl Error for BuildError
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 Freeze for BuildError
impl !RefUnwindSafe for BuildError
impl Send for BuildError
impl Sync for BuildError
impl Unpin for BuildError
impl UnsafeUnpin for BuildError
impl !UnwindSafe for BuildError
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