Skip to main content

RecurrenceRule

Struct RecurrenceRule 

Source
#[non_exhaustive]
pub struct RecurrenceRule {
Show 18 fields pub at_type: String, pub frequency: String, pub interval: Option<u64>, pub rscale: Option<String>, pub skip: Option<String>, pub first_day_of_week: Option<String>, pub by_day: Option<Vec<NDay>>, pub by_month_day: Option<Vec<i32>>, pub by_month: Option<Vec<String>>, pub by_year_day: Option<Vec<i32>>, pub by_week_no: Option<Vec<i32>>, pub by_hour: Option<Vec<u8>>, pub by_minute: Option<Vec<u8>>, pub by_second: Option<Vec<u8>>, pub by_set_position: Option<Vec<i32>>, pub count: Option<u64>, pub until: Option<LocalDateTime>, pub extra: Map<String, Value>,
}
Expand description

A recurrence rule as defined in RFC 8984 §4.3.3.

Used in recurrenceRules and excludedRecurrenceRules of a CalendarEvent (from jmap-calendars-types).

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§at_type: String

Object type discriminator; always "RecurrenceRule" on the wire.

Deserialize is liberal: if @type is absent (spec-violating vendor input), this field defaults to "RecurrenceRule" rather than failing the whole parent object’s deserialize. Serialize always emits the field. See bd:JMAP-ky8g.10.

§frequency: String

Recurrence frequency: "yearly", "monthly", "weekly", "daily", "hourly", "minutely", or "secondly".

§interval: Option<u64>

Interval between recurrences (≥ 1; default 1).

§rscale: Option<String>

Calendar system (default "gregorian").

§skip: Option<String>

How to handle skipped dates: "omit", "backward", "forward".

§first_day_of_week: Option<String>

First day of week (default "mo"): "mo"–"su".

§by_day: Option<Vec<NDay>>

Specific days within the frequency period.

§by_month_day: Option<Vec<i32>>

Specific days of the month (±1–±31).

§by_month: Option<Vec<String>>

Specific months (e.g. "1"–"12", optionally suffixed with "L").

§by_year_day: Option<Vec<i32>>

Specific days of the year (±1–±366).

§by_week_no: Option<Vec<i32>>

Specific weeks of the year (±1–±53).

§by_hour: Option<Vec<u8>>

Specific hours (0–23).

§by_minute: Option<Vec<u8>>

Specific minutes (0–59).

§by_second: Option<Vec<u8>>

Specific seconds (0–60).

§by_set_position: Option<Vec<i32>>

Filter by position within the set (positive = from start, negative = from end).

§count: Option<u64>

Maximum number of occurrences.

§until: Option<LocalDateTime>

The recurrence ends on or before this LocalDateTime (RFC 8984 §4.3.3 — until is a LocalDateTime, NOT a UTC date-time).

§extra: Map<String, Value>

Catch-all for vendor / site / private extension fields not covered by the typed fields above. Preserves unknown fields across deserialize/serialize round-trip per workspace extras-preservation policy (see workspace AGENTS.md).

Trait Implementations§

Source§

impl Clone for RecurrenceRule

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for RecurrenceRule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RecurrenceRule

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<RecurrenceRule, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for RecurrenceRule

Source§

impl PartialEq for RecurrenceRule

Source§

fn eq(&self, other: &RecurrenceRule) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for RecurrenceRule

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RecurrenceRule

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.