pub enum I18nError {
InvalidLocale {
input: String,
reason: String,
},
InvalidNumber {
input: String,
reason: String,
},
DateError(String),
FormatError(String),
}Expand description
国际化操作返回的错误类型。
Variants§
InvalidLocale
BCP-47 locale 字符串解析失败。
InvalidNumber
数值无法格式化(如 NaN、Infinity 或解析失败)。
DateError(String)
日期分量越界或无效。
FormatError(String)
ICU4X 数据或格式化失败。
Trait Implementations§
Source§impl Error for I18nError
impl Error for I18nError
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 I18nError
impl RefUnwindSafe for I18nError
impl Send for I18nError
impl Sync for I18nError
impl Unpin for I18nError
impl UnsafeUnpin for I18nError
impl UnwindSafe for I18nError
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