pub struct Rule<'a> {
pub name: &'a str,
pub from_year: Year,
pub to_year: Option<Year>,
pub month: Month,
pub day: DaySpec,
pub time: TimeSpecAndType,
pub time_to_add: TimeSpec,
pub letters: Option<&'a str>,
}Expand description
A rule definition line.
According to the zic(8) man page, a rule line has this form, along with
an example:
Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule US 1967 1973 ‐ Apr lastSun 2:00 1:00 DApart from the opening Rule to specify which kind of line this is, and
the type column, every column in the line has a field in this struct.
Fields§
§name: &'a strThe name of the set of rules that this rule is part of.
from_year: YearThe first year in which the rule applies.
to_year: Option<Year>The final year, or None if’s ‘only’.
month: MonthThe month in which the rule takes effect.
day: DaySpecThe day on which the rule takes effect.
time: TimeSpecAndTypeThe time of day at which the rule takes effect.
time_to_add: TimeSpecThe amount of time to be added when the rule is in effect.
letters: Option<&'a str>The variable part of time zone abbreviations to be used when this rule is in effect, if any.
Trait Implementations§
impl<'a> Copy for Rule<'a>
impl<'a> StructuralPartialEq for Rule<'a>
Auto Trait Implementations§
impl<'a> Freeze for Rule<'a>
impl<'a> RefUnwindSafe for Rule<'a>
impl<'a> Send for Rule<'a>
impl<'a> Sync for Rule<'a>
impl<'a> Unpin for Rule<'a>
impl<'a> UnwindSafe for Rule<'a>
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