pub enum DateTimeError {
FieldValueOutOfRange,
TimeZoneDisplacementOutOfRange,
DateOutOfRange,
TimestampOutOfRange,
OutsideJiffRange,
NeedsTimeZone,
TimeZoneNotRecognized,
Unsupported,
}Expand description
Why PostgreSQL refuses a date or time, one variant per message it raises, or why this crate declines to answer for it.
Variants§
FieldValueOutOfRange
A year, month, day, hour, minute or second no calendar or clock has.
TimeZoneDisplacementOutOfRange
An offset of 16 hours or more, or with minutes or seconds of 60 or more.
DateOutOfRange
A date before 4714-11-24 BC or from 5874898-01-01.
TimestampOutOfRange
A timestamp before 4714-11-24 BC or from 294277-01-01.
OutsideJiffRange
A value outside jiff’s years -9999 to 9999, an infinity included, where jiff’s types or its time zone database are needed.
NeedsTimeZone
A literal without an offset read as a timestamptz with no time zone in the
InputContext.
TimeZoneNotRecognized
An abbreviation whose set names a zone that does not exist.
Unsupported
A spelling this crate does not model. The readers take the ISO spelling
YYYY-MM-DD[( |T)HH:MM[:SS[.f]][offset]] that no DateStyle changes, followed by a zone
abbreviation or all-letter zone name and BC or AD, and the special words that need
no clock.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()