#[non_exhaustive]pub struct Recurrence {
pub id: EntityId,
pub recurrence_type: Option<RecurrenceType>,
pub days: Vec<i64>,
pub weekdays: Vec<i64>,
pub months: Vec<i64>,
pub position: Option<i64>,
pub interval: Option<i64>,
pub occurrences: Option<i64>,
pub time_periods: Vec<TimePeriod>,
}Expand description
A recurrence pattern as authored.
Not expanded into concrete dates: expansion needs a calendar library and a
bounded window, and an unbounded pattern (Occurrences absent) has no
finite expansion at all. The stated shape is returned and expansion is left
to a caller who can supply both.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: EntityIdThe entity.
recurrence_type: Option<RecurrenceType>How it repeats.
days: Vec<i64>DayComponent: days of the month it applies to, 1 through 31
(#233).
weekdays: Vec<i64>Weekdays it applies to, 1 = Monday through 7 = Sunday.
months: Vec<i64>MonthComponent: months it applies to, 1 = January through
12 = December (#233).
position: Option<i64>The ordinal position within the period, for positional patterns.
MONTHLY_BY_POSITION uses it as “the 2nd Tuesday”; a negative value
counts from the end of the period.
interval: Option<i64>The interval between occurrences.
occurrences: Option<i64>How many times it repeats, if bounded.
time_periods: Vec<TimePeriod>TimePeriods: the times of day each occurrence spans, in authored
order (#233). A reference that is not an IfcTimePeriod is not
listed.
Implementations§
Source§impl Recurrence
impl Recurrence
Sourcepub fn is_bounded(&self) -> bool
pub fn is_bounded(&self) -> bool
Whether the pattern states a finite number of occurrences.
An unbounded pattern is legal and common (“every Monday, forever”), so a caller expanding one must impose its own window.
Trait Implementations§
Source§impl Clone for Recurrence
impl Clone for Recurrence
Source§fn clone(&self) -> Recurrence
fn clone(&self) -> Recurrence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more