pub enum DateTimeError {
InvalidMonth(u8),
InvalidDayOfMonth(u8),
InvalidHour(u8),
InvalidMinute(u8),
InvalidSecond(u8),
InvalidNanosecond(u32),
OutOfRange,
}Expand description
The error type returned when date-time components are invalid or correspond to a timestamp outside the representable range.
Variants§
InvalidMonth(u8)
The month is not between 1 and 12.
InvalidDayOfMonth(u8)
The day of the month is less than 1, or more than the maximum value for this combination of year and month.
InvalidHour(u8)
The hour field value is not between 0 and 23.
InvalidMinute(u8)
The minute field value is not between 1 and 59.
InvalidSecond(u8)
The second field value is not between 1 and 59.
InvalidNanosecond(u32)
The nanosecond field value is more than 999 999 999.
OutOfRange
This date-time value cannot be represented as a TAI timestamp with the specified epoch.
Trait Implementations§
Source§impl Clone for DateTimeError
impl Clone for DateTimeError
Source§fn clone(&self) -> DateTimeError
fn clone(&self) -> DateTimeError
Returns a duplicate of the value. Read more
1.0.0 · 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 DateTimeError
impl Debug for DateTimeError
Source§impl<'de> Deserialize<'de> for DateTimeError
impl<'de> Deserialize<'de> for DateTimeError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DateTimeError
impl Display for DateTimeError
Source§impl Error for DateTimeError
Available on crate feature std only.
impl Error for DateTimeError
Available on crate feature
std only.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()
Source§impl Format for DateTimeError
impl Format for DateTimeError
Source§impl PartialEq for DateTimeError
impl PartialEq for DateTimeError
Source§impl Serialize for DateTimeError
impl Serialize for DateTimeError
impl Copy for DateTimeError
impl Eq for DateTimeError
impl StructuralPartialEq for DateTimeError
Auto Trait Implementations§
impl Freeze for DateTimeError
impl RefUnwindSafe for DateTimeError
impl Send for DateTimeError
impl Sync for DateTimeError
impl Unpin for DateTimeError
impl UnwindSafe for DateTimeError
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