pub struct IcalTimezone {
pub id: String,
pub observances: Vec<IcalObservance>,
}Expand description
A VTIMEZONE, read into the observances that place it.
Fields§
§id: StringThe TZID this zone answers to, verbatim.
observances: Vec<IcalObservance>Its observances, in source order.
Implementations§
Source§impl IcalTimezone
impl IcalTimezone
Sourcepub fn of_component(component: &IcalComponent<'_>) -> Option<Self>
pub fn of_component(component: &IcalComponent<'_>) -> Option<Self>
Read a VTIMEZONE component into its observances.
None when the component is not a VTIMEZONE or carries no TZID: a
zone nobody can name is a zone nobody can ask about.
Sourcepub fn of_calendar(ical: &Ical<'_>, tzid: &str) -> Option<Self>
pub fn of_calendar(ical: &Ical<'_>, tzid: &str) -> Option<Self>
The zone a calendar defines under tzid, if it defines one.
Sourcepub fn resolve(&self, local: IcalRecurDateTime) -> IcalOffset
pub fn resolve(&self, local: IcalRecurDateTime) -> IcalOffset
The offset in force at a civil local time, or the gap or fold it falls in.
A zone with no observance at all resolves everything to UTC, since it
states no offset to apply. A local time before the first transition
takes the offset that transition says came before it, which is what
TZOFFSETFROM is for.
Trait Implementations§
Source§impl Clone for IcalTimezone
impl Clone for IcalTimezone
Source§fn clone(&self) -> IcalTimezone
fn clone(&self) -> IcalTimezone
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IcalTimezone
impl Debug for IcalTimezone
impl Eq for IcalTimezone
Source§impl PartialEq for IcalTimezone
impl PartialEq for IcalTimezone
impl StructuralPartialEq for IcalTimezone
Auto Trait Implementations§
impl Freeze for IcalTimezone
impl RefUnwindSafe for IcalTimezone
impl Send for IcalTimezone
impl Sync for IcalTimezone
impl Unpin for IcalTimezone
impl UnsafeUnpin for IcalTimezone
impl UnwindSafe for IcalTimezone
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