pub struct RecurrenceRule {
pub frequency: RecurrenceFrequency,
pub interval: usize,
pub end: RecurrenceEndCondition,
pub days_of_week: Option<Vec<u8>>,
pub days_of_month: Option<Vec<i32>>,
pub months_of_year: Option<Vec<i32>>,
pub weeks_of_year: Option<Vec<i32>>,
pub days_of_year: Option<Vec<i32>>,
pub set_positions: Option<Vec<i32>>,
}Expand description
A recurrence rule describing how a reminder or event repeats.
Fields§
§frequency: RecurrenceFrequencyHow often it repeats (daily, weekly, monthly, yearly).
interval: usizeRepeat every N intervals (e.g., every 2 weeks).
end: RecurrenceEndConditionWhen the recurrence ends.
days_of_week: Option<Vec<u8>>Days of the week (1=Sun..7=Sat) for weekly/monthly rules.
days_of_month: Option<Vec<i32>>Days of the month (1-31, negatives count from end) for monthly rules.
months_of_year: Option<Vec<i32>>Months of the year (1=Jan..12=Dec) for yearly rules.
weeks_of_year: Option<Vec<i32>>Weeks of the year (1..=53, negatives count from end). Yearly rules only.
days_of_year: Option<Vec<i32>>Days of the year (1..=366, negatives count from end). Yearly rules only.
set_positions: Option<Vec<i32>>Set positions — filter applied after the other fields. E.g. with
frequency = Monthly, days_of_week = [2] (Monday), and
set_positions = [1] you get “the first Monday of every month”.
Negative values count from the end.
Trait Implementations§
Source§impl Clone for RecurrenceRule
impl Clone for RecurrenceRule
Source§fn clone(&self) -> RecurrenceRule
fn clone(&self) -> RecurrenceRule
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 RecurrenceRule
impl Debug for RecurrenceRule
Source§impl Default for RecurrenceRule
impl Default for RecurrenceRule
Source§fn default() -> RecurrenceRule
fn default() -> RecurrenceRule
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RecurrenceRule
impl RefUnwindSafe for RecurrenceRule
impl Send for RecurrenceRule
impl Sync for RecurrenceRule
impl Unpin for RecurrenceRule
impl UnsafeUnpin for RecurrenceRule
impl UnwindSafe for RecurrenceRule
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