Enum dtparse::ParseError
source · pub enum ParseError {
AmPmWithoutHour,
ImpossibleTimestamp(&'static str),
InvalidNumeric(String),
UnrecognizedFormat,
UnrecognizedToken(String),
TimezoneUnsupported,
YearMonthDayError(&'static str),
NoDate,
}
Expand description
Potential errors that come up when trying to parse time strings
Variants§
AmPmWithoutHour
Attempted to specify “AM” or “PM” without indicating an hour
ImpossibleTimestamp(&'static str)
Impossible value for a category; the 32nd day of a month is impossible
InvalidNumeric(String)
Unable to parse a numeric value from a token expected to be numeric
UnrecognizedFormat
Generally unrecognized date string; please report to maintainer so new test cases can be developed
UnrecognizedToken(String)
A token the parser did not recognize was in the string, and fuzzy mode was off
TimezoneUnsupported
A timezone could not be handled; please report to maintainer as the timestring likely exposes a bug in the implementation
YearMonthDayError(&'static str)
Parser unable to make sense of year/month/day parameters in the time string; please report to maintainer as the timestring likely exposes a bug in implementation
NoDate
Parser unable to find any date/time-related content in the supplied string
Trait Implementations§
source§impl Debug for ParseError
impl Debug for ParseError
source§impl Display for ParseError
impl Display for ParseError
source§impl Error for ParseError
impl Error for ParseError
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<Error> for ParseError
impl From<Error> for ParseError
source§fn from(err: DecimalError) -> Self
fn from(err: DecimalError) -> Self
source§impl From<ParseIntError> for ParseError
impl From<ParseIntError> for ParseError
source§fn from(err: ParseIntError) -> Self
fn from(err: ParseIntError) -> Self
source§impl PartialEq<ParseError> for ParseError
impl PartialEq<ParseError> for ParseError
source§fn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
self
and other
values to be equal, and is used
by ==
.