pub enum Rule {
Show 35 variants
EOI,
WHITESPACE,
date_expression,
relative_day_and_specific_time,
relative_date,
relative_term,
specific_day_and_time,
specific_day,
specific_time,
future_time,
next_or_last,
hour,
minute,
am_pm,
number,
time_unit,
monday,
tuesday,
wednesday,
thursday,
friday,
saturday,
sunday,
tomorrow,
today,
yesterday,
next,
this,
last,
am,
pm,
day_s,
week_s,
month_s,
year_s,
}Variants§
EOI
End-of-input
WHITESPACE
Whitespace or tab
date_expression
Parses a full date expression, which could be a relative date, specific day and time, or a future time phrase.
- Examples: “next Monday”, “tomorrow at 3:00 PM”, “in 2 days”
relative_day_and_specific_time
Parses relative day expressions combined with specific times, such as “tomorrow at 4:00 PM”.
relative_date
Parses expressions for relative dates, for example, “next Tuesday” or “last Friday”.
relative_term
Parses terms representing days relative to today, including “tomorrow”, “today”, and “yesterday”.
specific_day_and_time
Parses expressions that specify both a day and a time, for example, “Wednesday at 5:00 AM”.
specific_day
Parses specific days of the week, with case-insensitive options.
specific_time
Parses a specific time expression, including hour, minute, and AM/PM notation.
future_time
Parses future time expressions, such as “in 3 days” or “in 2 weeks”.
next_or_last
Matches relative terms for dates, allowing “next”, “last”, and “this” qualifiers.
hour
Parses a valid hour value as a sequence of digits.
minute
Parses a valid minute value as a sequence of digits.
am_pm
Parses AM/PM markers, with case-insensitive options.
number
Parses a sequence of digits representing a number for time units.
time_unit
Matches time unit expressions in singular or plural form (for example, “day” or “days”).
monday
Day of the week: Monday or monday (case-insensitive).
tuesday
Day of the week: Tuesday or tuesday (case-insensitive).
wednesday
Day of the week: Wednesday or wednesday (case-insensitive).
thursday
Day of the week: Thursday or thursday (case-insensitive).
friday
Day of the week: Friday or friday (case-insensitive).
saturday
Day of the week: Saturday or saturday (case-insensitive).
sunday
Day of the week: Sunday or sunday (case-insensitive).
tomorrow
Relative term: Tomorrow or tomorrow (case-insensitive).
today
Relative term: Today or today (case-insensitive).
yesterday
Relative term: Yesterday or yesterday (case-insensitive).
next
Relative direction term: Next or next (case-insensitive).
this
Relative direction term: This or this (case-insensitive).
last
Relative direction term: Last or last (case-insensitive).
am
Time of day marker: AM or am (case-insensitive).
pm
Time of day marker: PM or pm (case-insensitive).
day_s
Singular or plural form of “day”.
week_s
Singular or plural form of “week”.
month_s
Singular or plural form of “month”.
year_s
Singular or plural form of “year”.
Implementations§
Trait Implementations§
Source§impl Ord for Rule
impl Ord for Rule
Source§impl Parser<Rule> for DateParser
impl Parser<Rule> for DateParser
Source§impl PartialOrd for Rule
impl PartialOrd for Rule
impl Copy for Rule
impl Eq for Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnwindSafe for Rule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)