pub enum TimeError {
Parse(String),
Misordered(String),
ImpossibleDate(String),
Weekday(String),
NoPayPeriod(String),
}
Expand description
A simple categorization of things that could go wrong.
Every error provides a descriptive string that can be displayed.
Variants§
Parse(String)
The time expression cannot be parsed by the available grammar.
Misordered(String)
The time expression consists of a time range and the end of the range is before the beginning.
ImpossibleDate(String)
The time expression specifies an impossible date, such as the 31st of September.
Weekday(String)
The time expression specifies a weekday different from that required by the rest of the expression, such as Wednesday, May 5, 1969, which was a Tuesday.
NoPayPeriod(String)
The time expression refers to a pay period, but the starting date of a reference pay period has not been provided, so the pay period is undefined.
Implementations§
Trait Implementations§
source§impl Error for TimeError
impl Error for TimeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
Auto Trait Implementations§
impl RefUnwindSafe for TimeError
impl Send for TimeError
impl Sync for TimeError
impl Unpin for TimeError
impl UnwindSafe for TimeError
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