pub enum DateTimeError {
InvalidTimeOfDay {
hour: u8,
minute: u8,
second: u8,
},
NoLeapSecondInsertion {
date: LocalDays<i64>,
hour: u8,
minute: u8,
second: u8,
},
LeapSecondDeletion {
date: LocalDays<i64>,
hour: u8,
minute: u8,
second: u8,
},
NotRepresentable {
date: LocalDays<i64>,
hour: u8,
minute: u8,
second: u8,
},
InvalidHistoricDate {
year: i32,
month: Month,
day: u8,
},
InvalidGregorianDate {
year: i32,
month: Month,
day: u8,
},
InvalidDayOfYear {
year: i32,
day_of_year: u16,
},
}Expand description
Errors that may be returned when combining a calendar date with a time-of-day to create a
TimePoint.
Variants§
InvalidTimeOfDay
Returned when the given time-of-day does not exist in general (independent of whether the used time scale has leap seconds).
NoLeapSecondInsertion
Returned when the requested datetime has a 61st second but is not actually situated at a leap second insertion.
LeapSecondDeletion
Returned when the requested datetime does not exist because of a leap second deletion.
NotRepresentable
Returned when the requested datetime could not fit in a TimePoint with the given
Representation.
InvalidHistoricDate
Returned when the requested date is not a valid historic date.
InvalidGregorianDate
Returned when the requested date is not a valid Gregorian date.
InvalidDayOfYear
Returned when the requested day-of-year does not exist in the given year.
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<T, P> From<DateTimeError> for FineDateTimeError<T, P>where
P: Unit,
T: TimeRepresentation,
impl<T, P> From<DateTimeError> for FineDateTimeError<T, P>where
P: Unit,
T: TimeRepresentation,
Source§fn from(value: DateTimeError) -> Self
fn from(value: DateTimeError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidDayOfYear> for DateTimeError
impl From<InvalidDayOfYear> for DateTimeError
Source§fn from(value: InvalidDayOfYear) -> Self
fn from(value: InvalidDayOfYear) -> Self
Converts to this type from the input type.
Source§impl From<InvalidGregorianDate> for DateTimeError
impl From<InvalidGregorianDate> for DateTimeError
Source§fn from(value: InvalidGregorianDate) -> Self
fn from(value: InvalidGregorianDate) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHistoricDate> for DateTimeError
impl From<InvalidHistoricDate> for DateTimeError
Source§fn from(value: InvalidHistoricDate) -> Self
fn from(value: InvalidHistoricDate) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DateTimeError
impl PartialEq 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