#[non_exhaustive]pub struct TimeZoneRule {
pub at_type: String,
pub start: LocalDateTime,
pub offset_from: UTCOffset,
pub offset_to: UTCOffset,
pub recurrence_rules: Option<Vec<RecurrenceRule>>,
pub recurrence_overrides: Option<BTreeMap<LocalDateTime, PatchObject>>,
pub names: Option<BTreeMap<String, bool>>,
pub comments: Option<Vec<String>>,
pub extra: Map<String, Value>,
}Expand description
A STANDARD or DAYLIGHT sub-component of a TimeZone (RFC 8984 §4.7.2).
Maps to a VTIMEZONE STANDARD or DAYLIGHT sub-component from iCalendar. At most one recurrence rule is allowed per rule.
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.at_type: StringObject type discriminator; always "TimeZoneRule" on the wire.
Deserialize is liberal: if @type is absent (spec-violating
vendor input), this field defaults to "TimeZoneRule" rather
than failing the whole parent object’s deserialize. Serialize
always emits the field. See bd:JMAP-ky8g.10.
start: LocalDateTimeDTSTART from iCalendar — the local date-time the rule first applies.
offset_from: UTCOffsetTZOFFSETFROM from iCalendar — the UTC offset in effect before the
transition (format ±HHMM or ±HHMMSS). Typed as
UTCOffset for consistency with the other temporal newtypes;
the inner string is opaque to this crate (validation deferred to
the backend per PLAN.md).
offset_to: UTCOffsetTZOFFSETTO from iCalendar — the UTC offset in effect after the
transition (format ±HHMM or ±HHMMSS). Typed as
UTCOffset for consistency with the other temporal newtypes.
recurrence_rules: Option<Vec<RecurrenceRule>>RRULE from iCalendar — recurrence rules for the transition.
Per RFC 8984 §4.7.2 the until value MUST be interpreted as a
local time in the UTC time zone during evaluation.
recurrence_overrides: Option<BTreeMap<LocalDateTime, PatchObject>>RDATE properties from iCalendar — additional explicit transition
dates. Keys are LocalDateTime strings; the PatchObject value MUST
be the empty JSON object ({}) per RFC 8984 §4.7.2.
The type permits non-empty PatchObject values that the wire spec forbids — this is deliberate for round-trip preservation of in-flight data. Consumers check that every value is the empty patch themselves (bd:JMAP-ops7.38).
names: Option<BTreeMap<String, bool>>TZNAME properties from iCalendar — set of human-readable names
for this rule. The map value MUST be true for each key.
comments: Option<Vec<String>>COMMENT properties from iCalendar — order MUST be preserved.
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 TimeZoneRule
impl Clone for TimeZoneRule
Source§fn clone(&self) -> TimeZoneRule
fn clone(&self) -> TimeZoneRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more