pub enum DateTimeSyntaxError {
Show 17 variants
InvalidYear(ParseNumberError),
UnexpectedYearToMonthSeparator(Option<u8>),
InvalidMonth(ParseNumberError),
UnexpectedMonthToDaySeparator(Option<u8>),
InvalidDay(ParseNumberError),
UnexpectedDayHourSeparator(Option<u8>),
InvalidHour(ParseNumberError),
UnexpectedHourMinuteSeparator(Option<u8>),
InvalidMinute(ParseNumberError),
UnexpectedMinuteSecondSeparator(Option<u8>),
InvalidSecond,
UnexpectedNoTimezone,
UnexpectedCharactersAfterTimezone,
InvalidTimezoneHour(ParseNumberError),
UnexpectedTimezoneHourMinuteSeparator(Option<u8>),
InvalidTimezoneMinute(ParseNumberError),
Generic(GenericSyntaxError),
}Expand description
An error experienced while trying to parse crate::date::DateTime.
Variants§
InvalidYear(ParseNumberError)
The year component was not a valid number.
UnexpectedYearToMonthSeparator(Option<u8>)
The separator between year and month was not -.
InvalidMonth(ParseNumberError)
The month component was not a valid number.
UnexpectedMonthToDaySeparator(Option<u8>)
The separator between month and day was not -.
InvalidDay(ParseNumberError)
The day component was not a valid number.
UnexpectedDayHourSeparator(Option<u8>)
The separator between day and hour was not T or t.
InvalidHour(ParseNumberError)
The hour component was not a valid number.
UnexpectedHourMinuteSeparator(Option<u8>)
The separator between hour and minute was not :.
InvalidMinute(ParseNumberError)
The minute component was not a valid number.
UnexpectedMinuteSecondSeparator(Option<u8>)
The separator between minute and second was not :.
InvalidSecond
The second component was not a valid number.
UnexpectedNoTimezone
No timezone information was provided.
UnexpectedCharactersAfterTimezone
Characters existed after the timezone.
InvalidTimezoneHour(ParseNumberError)
The hour component of the timezone offset was not a valid number.
UnexpectedTimezoneHourMinuteSeparator(Option<u8>)
The separator between hour and minute in the timezone was not :.
InvalidTimezoneMinute(ParseNumberError)
The minute component of the timezone offset was not a valid number.
Generic(GenericSyntaxError)
A generic syntax error that breaks parsing of the line.
Trait Implementations§
Source§impl Clone for DateTimeSyntaxError
impl Clone for DateTimeSyntaxError
Source§fn clone(&self) -> DateTimeSyntaxError
fn clone(&self) -> DateTimeSyntaxError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DateTimeSyntaxError
impl Debug for DateTimeSyntaxError
Source§impl Display for DateTimeSyntaxError
Available on non-crate feature chrono only.
impl Display for DateTimeSyntaxError
chrono only.Source§impl Error for DateTimeSyntaxError
Available on non-crate feature chrono only.
impl Error for DateTimeSyntaxError
chrono only.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
Source§impl From<DateTimeSyntaxError> for ParseTagValueError
impl From<DateTimeSyntaxError> for ParseTagValueError
Source§fn from(value: DateTimeSyntaxError) -> Self
fn from(value: DateTimeSyntaxError) -> Self
Source§impl From<DateTimeSyntaxError> for SyntaxError
Available on non-crate feature chrono only.
impl From<DateTimeSyntaxError> for SyntaxError
chrono only.Source§fn from(value: DateTimeSyntaxError) -> Self
fn from(value: DateTimeSyntaxError) -> Self
Source§impl From<DateTimeSyntaxError> for ValidationError
impl From<DateTimeSyntaxError> for ValidationError
Source§fn from(value: DateTimeSyntaxError) -> Self
fn from(value: DateTimeSyntaxError) -> Self
Source§impl From<GenericSyntaxError> for DateTimeSyntaxError
Available on non-crate feature chrono only.
impl From<GenericSyntaxError> for DateTimeSyntaxError
chrono only.