#[non_exhaustive]pub enum DateTimeError {
Syntax(&'static str),
Field(&'static str),
OutOfRange,
HttpDate,
Ntp,
}Expand description
Why a time string or timestamp was rejected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Syntax(&'static str)
Not in the accepted lexical form.
Field(&'static str)
A field is outside its range (month 13, 29 February in a common year, hour 25, zone beyond +14:00 …).
OutOfRange
The instant cannot be represented.
HttpDate
Not an HTTP Date value.
Ntp
Not an 8-byte NTP timestamp.
Trait Implementations§
Source§impl Clone for DateTimeError
impl Clone for DateTimeError
impl Copy for DateTimeError
Source§impl Debug for DateTimeError
impl Debug for DateTimeError
Source§impl Display for DateTimeError
impl Display for DateTimeError
impl Eq for DateTimeError
Source§impl Error for DateTimeError
impl Error for DateTimeError
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 From<DateTimeError> for TimingError
impl From<DateTimeError> for TimingError
Source§fn from(source: DateTimeError) -> Self
fn from(source: DateTimeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DateTimeError
impl PartialEq for DateTimeError
impl StructuralPartialEq for DateTimeError
Auto Trait Implementations§
impl Forget for DateTimeError
impl Freeze for DateTimeError
impl RefUnwindSafe for DateTimeError
impl Send for DateTimeError
impl Sync for DateTimeError
impl Unpin for DateTimeError
impl UnsafeUnpin 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