pub enum EsFluentError {
Show 13 variants
ConfigNotFound {
path: PathBuf,
},
ConfigParseError(Error),
AssetsNotFound {
path: PathBuf,
},
FallbackLanguageNotFound {
language: String,
},
InvalidLanguageIdentifier {
identifier: String,
reason: String,
},
LanguageNotSupported(LanguageIdentifier),
FluentParseError(Vec<ParserError>),
FluentSerializeError(Error),
IoError(Error),
EnvVarError(VarError),
BackendError(Error),
JsonError(Error),
MissingPackageName,
}Expand description
Common error types shared across the es-fluent ecosystem.
Variants§
ConfigNotFound
Configuration file not found.
ConfigParseError(Error)
Failed to parse configuration file.
AssetsNotFound
Assets directory not found.
FallbackLanguageNotFound
Fallback language directory not found.
InvalidLanguageIdentifier
Invalid language identifier.
LanguageNotSupported(LanguageIdentifier)
Language not supported.
FluentParseError(Vec<ParserError>)
Fluent parsing error.
FluentSerializeError(Error)
Fluent serialization error.
IoError(Error)
IO error during file operations.
EnvVarError(VarError)
Environment variable error.
BackendError(Error)
Generic backend error.
JsonError(Error)
JSON serialization error.
MissingPackageName
Missing package name.
Implementations§
Source§impl EsFluentError
impl EsFluentError
Sourcepub fn config_not_found(path: impl Into<PathBuf>) -> Self
pub fn config_not_found(path: impl Into<PathBuf>) -> Self
Creates a configuration not found error.
Sourcepub fn assets_not_found(path: impl Into<PathBuf>) -> Self
pub fn assets_not_found(path: impl Into<PathBuf>) -> Self
Creates an assets not found error.
Sourcepub fn invalid_language_identifier(
identifier: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn invalid_language_identifier( identifier: impl Into<String>, reason: impl Into<String>, ) -> Self
Creates an invalid language identifier error.
Sourcepub fn fallback_language_not_found(language: impl Into<String>) -> Self
pub fn fallback_language_not_found(language: impl Into<String>) -> Self
Creates a fallback language not found error.
Trait Implementations§
Source§impl Debug for EsFluentError
impl Debug for EsFluentError
Source§impl Display for EsFluentError
impl Display for EsFluentError
Source§impl Error for EsFluentError
impl Error for EsFluentError
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()
Source§impl From<Error> for EsFluentError
impl From<Error> for EsFluentError
Source§impl From<Error> for EsFluentError
impl From<Error> for EsFluentError
Source§impl From<Error> for EsFluentError
impl From<Error> for EsFluentError
Source§impl From<Error> for EsFluentError
impl From<Error> for EsFluentError
Source§impl From<Error> for EsFluentError
impl From<Error> for EsFluentError
Auto Trait Implementations§
impl Freeze for EsFluentError
impl !RefUnwindSafe for EsFluentError
impl Send for EsFluentError
impl Sync for EsFluentError
impl Unpin for EsFluentError
impl !UnwindSafe for EsFluentError
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