[−][src]Struct parse_zoneinfo::table::RuleInfo
An owned rule definition line.
This mimics the Rule
struct in the line
module, only its uses owned
Strings instead of string slices, and has had some pre-processing
applied to it.
Fields
from_year: Year
The year that this rule starts applying.
to_year: Option<Year>
The year that this rule finishes applying, inclusive, or None
if
it applies up until the end of this timespan.
month: Month
The month it applies on.
day: DaySpec
The day it applies on.
time: i64
The exact time it applies on.
time_type: TimeType
The type of time that time is.
time_to_add: i64
The amount of time to save.
letters: Option<String>
Any extra letters that should be added to this time zone’s
abbreviation, in place of %s
.
Methods
impl RuleInfo
[src]
pub fn applies_to_year(&self, year: i64) -> bool
[src]
Returns whether this rule is in effect during the given year.
pub fn absolute_datetime(
&self,
year: i64,
utc_offset: i64,
dst_offset: i64
) -> i64
[src]
&self,
year: i64,
utc_offset: i64,
dst_offset: i64
) -> i64
Trait Implementations
impl Debug for RuleInfo
[src]
impl<'line> From<Rule<'line>> for RuleInfo
[src]
impl PartialEq<RuleInfo> for RuleInfo
[src]
impl StructuralPartialEq for RuleInfo
[src]
Auto Trait Implementations
impl RefUnwindSafe for RuleInfo
impl Send for RuleInfo
impl Sync for RuleInfo
impl Unpin for RuleInfo
impl UnwindSafe for RuleInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,