#[non_exhaustive]pub struct RecurrenceDraft<'a> {
pub recurrence_type: &'a str,
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<EntityId>,
}Expand description
Authored fields for IfcRecurrencePattern.
Weekday and month components are 1-based in the schema: 1 = Monday through 7 = Sunday, and 1 = January through 12 = December. Out-of-range values are refused rather than written, because a reader has no way to tell a 0-based authoring mistake from a deliberate value.
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.recurrence_type: &'a strRecurrenceType. Required by the schema.
days: Vec<i64>DayComponent: days of the month, 1..=31.
weekdays: Vec<i64>WeekdayComponent: 1 = Monday through 7 = Sunday.
months: Vec<i64>MonthComponent: 1 = January through 12 = December.
position: Option<i64>Position, for positional patterns. Negative counts from the end.
interval: Option<i64>Interval: repeat every n periods. Must be positive.
occurrences: Option<i64>Occurrences: how many times it repeats. Must be positive.
time_periods: Vec<EntityId>TimePeriods: the IfcTimePeriod records (from
create_time_period) each occurrence
spans, in authored order. Empty writes $ (#233).
Implementations§
Source§impl<'a> RecurrenceDraft<'a>
impl<'a> RecurrenceDraft<'a>
Sourcepub fn new(recurrence_type: &'a str) -> Self
pub fn new(recurrence_type: &'a str) -> Self
Starts a draft for an IfcRecurrencePattern with its required
RecurrenceType and every component unset.
Sourcepub fn weekdays(self, value: Vec<i64>) -> Self
pub fn weekdays(self, value: Vec<i64>) -> Self
Sets WeekdayComponent, 1 = Monday through 7 = Sunday.
Sourcepub fn months(self, value: Vec<i64>) -> Self
pub fn months(self, value: Vec<i64>) -> Self
Sets MonthComponent, 1 = January through 12 = December.
Sourcepub fn occurrences(self, value: i64) -> Self
pub fn occurrences(self, value: i64) -> Self
Sets Occurrences, a positive count.
Sourcepub fn time_periods(self, value: Vec<EntityId>) -> Self
pub fn time_periods(self, value: Vec<EntityId>) -> Self
Sets TimePeriods, the IfcTimePeriod records the pattern’s
occurrences span, in authored order (#233).