#[non_exhaustive]pub struct Calendar {
pub at_type: Option<String>,
pub kind: Option<String>,
pub uri: Option<String>,
pub media_type: Option<String>,
pub contexts: Option<BTreeMap<String, bool>>,
pub pref: Option<u32>,
pub label: Option<String>,
pub extra: Map<String, Value>,
}Expand description
A calendaring resource (RFC 9553 §2.4.1).
Extends the abstract Resource
type with a mandatory kind value of either "calendar" or "freeBusy".
kind and uri are mandatory on the wire but modelled as Option
to permit partial-response deserialization; callers building a fresh
Calendar MUST populate both fields. See the crate-level
Design: optional fields and Option<...>
section.
Distinct from the JMAP Calendars binding object
jmap_calendars_types::Calendar:
that type is a top-level JMAP wire object with id, name,
myRights, shareWith, etc., whereas this Calendar is a JSContact
resource sub-object embedded in a ContactCard. The two wire shapes
are unrelated.
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: Option<String>Object type discriminator; SHOULD be "Calendar" when present per RFC 9553 §1.3.4 (may be omitted in defaultType positions).
kind: Option<String>"calendar" or "freeBusy". Mandatory per RFC 9553 §2.4.1, but
modelled as Option to permit partial-response deserialization.
uri: Option<String>The resource URI (RFC 3986). Mandatory on the wire per
RFC 9553 §1.4.4, but modelled as Option to permit
partial-response deserialization.
media_type: Option<String>IANA media type of the resource.
contexts: Option<BTreeMap<String, bool>>Contexts in which to use the resource (key → true).
pref: Option<u32>Preference order in 1..=100 (lower = more preferred).
label: Option<String>Custom label for the value.
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).