pub enum DateErrors {
InvalidDay {
day: u8,
},
InvalidMonth {
month: u8,
},
FormatDateError,
InvalidYear(u64),
InvalidParsing(String),
}
Expand description
Errors on date boundaries
The errors given when a date is out of bounds, for example a 13th month or the 41st day of a month.
Variants§
InvalidDay
Enum variant when day is out of bounds
InvalidMonth
Enum variant when month is out of bounds
FormatDateError
Enum variant when a formatter field is not resolved
InvalidYear(u64)
Invalid year variant.
InvalidParsing(String)
Error to return when triying to parse something that cannot be respresented as a number
Trait Implementations§
Source§impl Debug for DateErrors
impl Debug for DateErrors
Source§impl Display for DateErrors
impl Display for DateErrors
Source§impl Error for DateErrors
impl Error for DateErrors
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 DateErrors
impl RefUnwindSafe for DateErrors
impl Send for DateErrors
impl Sync for DateErrors
impl Unpin for DateErrors
impl UnwindSafe for DateErrors
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