pub enum FormattingError {
UnsupportedLocale(String),
NonFinite(f64),
InvalidDateTime(DateTimeError),
InvalidFormat(String),
OutOfRange(String),
}Expand description
Errors that can occur during locale-aware formatting.
Variants§
UnsupportedLocale(String)
The requested locale is not supported and no suitable fallback was found.
NonFinite(f64)
A non-finite floating point value (NaN or infinity) was encountered.
InvalidDateTime(DateTimeError)
A date or time component was invalid.
InvalidFormat(String)
An invalid formatting pattern or configuration was provided.
OutOfRange(String)
A numeric value is out of range for the requested format.
Trait Implementations§
Source§impl Clone for FormattingError
impl Clone for FormattingError
Source§fn clone(&self) -> FormattingError
fn clone(&self) -> FormattingError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormattingError
impl Debug for FormattingError
Source§impl Display for FormattingError
impl Display for FormattingError
Source§impl Error for FormattingError
impl Error for FormattingError
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<DateTimeError> for FormattingError
impl From<DateTimeError> for FormattingError
Source§fn from(err: DateTimeError) -> FormattingError
fn from(err: DateTimeError) -> FormattingError
Converts to this type from the input type.
Source§impl PartialEq for FormattingError
impl PartialEq for FormattingError
impl StructuralPartialEq for FormattingError
Auto Trait Implementations§
impl Freeze for FormattingError
impl RefUnwindSafe for FormattingError
impl Send for FormattingError
impl Sync for FormattingError
impl Unpin for FormattingError
impl UnsafeUnpin for FormattingError
impl UnwindSafe for FormattingError
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