#[non_exhaustive]pub struct RecurrenceRule {
pub start: Timestamp,
pub end: Option<Timestamp>,
pub frequency: RecurrenceFrequency,
pub interval: u16,
pub by_weekday: Option<Vec<RecurrenceWeekday>>,
pub by_n_weekday: Option<Vec<RecurrenceNWeekday>>,
pub by_month: Option<Vec<RecurrenceMonth>>,
pub by_month_day: Option<Vec<u8>>,
pub by_year_day: Option<Vec<u16>>,
pub count: Option<u32>,
}Expand description
How a scheduled event repeats, modelled on the iCalendar RRULE.
Discord only accepts a subset of combinations (for example weekly events on one weekday, or
monthly events on the n-th weekday); see the documentation for the allowed shapes. end,
by_year_day and count are set by Discord and cannot be sent.
discord.js counterpart: GuildScheduledEventRecurrenceRule.
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.start: TimestampWhen the recurrence interval starts.
end: Option<Timestamp>When the recurrence interval ends.
frequency: RecurrenceFrequencyHow often the event repeats.
interval: u16The spacing between events in units of frequency (e.g. 2 with Weekly = every other
week).
by_weekday: Option<Vec<RecurrenceWeekday>>The weekdays to repeat on.
by_n_weekday: Option<Vec<RecurrenceNWeekday>>The n-th weekdays of the month to repeat on.
by_month: Option<Vec<RecurrenceMonth>>The months to repeat in.
by_month_day: Option<Vec<u8>>The days of the month to repeat on.
by_year_day: Option<Vec<u16>>The days of the year to repeat on (1-364).
count: Option<u32>How many times the event may repeat before stopping.
Trait Implementations§
Source§impl Clone for RecurrenceRule
impl Clone for RecurrenceRule
Source§impl Debug for RecurrenceRule
impl Debug for RecurrenceRule
Source§impl<'de> Deserialize<'de> for RecurrenceRule
impl<'de> Deserialize<'de> for RecurrenceRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for RecurrenceRule
Source§impl From<RecurrenceRule> for RecurrenceRuleData
impl From<RecurrenceRule> for RecurrenceRuleData
Source§fn from(rule: RecurrenceRule) -> Self
fn from(rule: RecurrenceRule) -> Self
Keeps the settable fields of an existing rule (not end, count, by_year_day).