Struct parse_zoneinfo::line::Rule
source · 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 D
Apart 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 str
The name of the set of rules that this rule is part of.
from_year: Year
The first year in which the rule applies.
to_year: Option<Year>
The final year, or None
if’s ‘only’.
month: Month
The month in which the rule takes effect.
day: DaySpec
The day on which the rule takes effect.
time: TimeSpecAndType
The time of day at which the rule takes effect.
time_to_add: TimeSpec
The 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§
source§impl<'a> PartialEq for Rule<'a>
impl<'a> PartialEq for Rule<'a>
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