#[non_exhaustive]pub struct PrincipalCalendarsCapability {
pub account_id: Option<Id>,
pub may_get_availability: bool,
pub may_share_with: bool,
pub calendar_address: Option<String>,
}Expand description
The value of Principal.capabilities["urn:ietf:params:jmap:calendars"]
on a JMAP Principals object (draft-ietf-jmap-calendars-33 §2.1).
This is distinct from the session-level CalendarsCapability. Where
CalendarsCapability appears in the JMAP Session capabilities map,
PrincipalCalendarsCapability appears inside a Principal object’s own
capabilities map and describes that principal’s calendar presence.
§Field semantics
account_id— the JMAP account id that contains this principal’s calendar data, ornullif the principal has no calendar account accessible to the requesting user.may_get_availability— the requesting user may callPrincipal/getAvailabilityfor this principal.may_share_with— the requesting user may add this principal to theshareWithof their own Calendar objects.calendar_address— the iTIP scheduling address for this principal (e.g."mailto:alice@example.com"), ornullif the principal may not be added as a participant to an event.
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.account_id: Option<Id>Id of the account containing this principal’s calendar data,
or null if no accessible calendar account exists.
Required-and-nullable: always present on the wire, as null or an Id.
Do NOT add skip_serializing_if to this field: draft-ietf-jmap-calendars
§2.1 types accountId as Id|null, so omitting it on None is a
wire-protocol break, not a clean-up. The regression test
principal_calendars_capability_account_id_null_serializes (in
tests/types_test.rs) pins the current behavior. Precedent:
CalendarAlert.recurrence_id, bd:JMAP-1rwf.7.
may_get_availability: boolThe requesting user may call Principal/getAvailability for this
principal.
The requesting user may add this principal to the shareWith property
of their own Calendar objects.
calendar_address: Option<String>iTIP scheduling address for this principal, or null when it may
not be added as a participant (draft-ietf-jmap-calendars-33 §2.1:
“calendarAddress: String|null … otherwise, this is null”).
Required-and-nullable: always present on the wire, as null or a
String.