pub enum LocalizationError {
Preference(String),
InvalidLocale(String),
InvalidResource {
resource: String,
detail: String,
},
Format {
namespace: String,
id: String,
detail: String,
},
}Expand description
A catalog, locale, or message could not be used.
Variants§
Preference(String)
A language preference could not be read or saved.
InvalidLocale(String)
The requested language tag is invalid.
InvalidResource
A Fluent resource is malformed or contains duplicate definitions.
Fields
Format
Neither a translation nor the source could be formatted.
Trait Implementations§
Source§impl Debug for LocalizationError
impl Debug for LocalizationError
Source§impl Display for LocalizationError
impl Display for LocalizationError
Source§impl Error for LocalizationError
impl Error for LocalizationError
1.30.0 · 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 LocalizationError
impl RefUnwindSafe for LocalizationError
impl Send for LocalizationError
impl Sync for LocalizationError
impl Unpin for LocalizationError
impl UnsafeUnpin for LocalizationError
impl UnwindSafe for LocalizationError
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more