pub struct IcalRecurSet {
pub start: Option<IcalRecurDateTime>,
pub rules: Vec<IcalRecurRule>,
pub dates: Vec<IcalRecurDateTime>,
pub exrules: Vec<IcalRecurRule>,
pub exdates: Vec<IcalRecurDateTime>,
pub overrides: Vec<IcalRecurOverride>,
}Expand description
The recurrence set of one component: what adds, subtracts and overrides.
Build one from a decoded component with
of_component, or by hand, and walk it with
expand.
Fields§
§start: Option<IcalRecurDateTime>The DTSTART, always the first instance of the set (RFC 5545 3.8.2.4).
rules: Vec<IcalRecurRule>Every RRULE.
dates: Vec<IcalRecurDateTime>Every date named by an RDATE, in order. A period item contributes its
start.
exrules: Vec<IcalRecurRule>Every EXRULE, deprecated by RFC 5545 but still on the wire.
exdates: Vec<IcalRecurDateTime>Every date named by an EXDATE, in order.
overrides: Vec<IcalRecurOverride>The overrides that replace instances, in order of identity.
Implementations§
Source§impl IcalRecurSet
impl IcalRecurSet
Sourcepub fn of_component(component: &IcalComponent<'_>) -> Self
pub fn of_component(component: &IcalComponent<'_>) -> Self
Read the set a decoded component denotes, its overrides aside.
A component with no DTSTART and no RDATE denotes nothing and comes
back empty rather than as an error: this is the liberal side of the
crate. A malformed date or rule is skipped for the same reason.
Sourcepub fn with_override(&mut self, component: &IcalComponent<'_>) -> &mut Self
pub fn with_override(&mut self, component: &IcalComponent<'_>) -> &mut Self
Add the override a sibling component carrying a RECURRENCE-ID states.
A component with no RECURRENCE-ID, or with no DTSTART to move the
instance to, is not an override and is ignored.
Sourcepub fn of_uid(components: &[IcalComponent<'_>], uid: &str) -> Self
pub fn of_uid(components: &[IcalComponent<'_>], uid: &str) -> Self
The set a whole calendar denotes for one UID: the series component,
plus every sibling that overrides an instance of it.
The series is the component carrying that UID with no
RECURRENCE-ID; every other one carrying it is an override.
Sourcepub fn expand(&self) -> IcalRecurSetExpand<'_> ⓘ
pub fn expand(&self) -> IcalRecurSetExpand<'_> ⓘ
Walk the set, lazily, in identity order.
Sourcepub fn expand_in_zone(&self, zone: &IcalTz) -> IcalRecurSetExpand<'_> ⓘ
pub fn expand_in_zone(&self, zone: &IcalTz) -> IcalRecurSetExpand<'_> ⓘ
Walk the set against a time zone, dropping the instances its rules generate at local times the zone jumps over (RFC 5545 3.3.10).
The filter sits on the rule streams alone. An RDATE does not generate
an instance, it names one, so a date written into one is as deliberate
as a lone DTSTART and is kept whatever the zone says of it.
Trait Implementations§
Source§impl Clone for IcalRecurSet
impl Clone for IcalRecurSet
Source§fn clone(&self) -> IcalRecurSet
fn clone(&self) -> IcalRecurSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more