Enum two_timer::TimeError

source ·
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.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.