#[non_exhaustive]pub struct Relation {
pub at_type: Option<String>,
pub relation: Option<HashMap<String, bool>>,
pub extra: Map<String, Value>,
}Expand description
A relationship to another Card (RFC 9553 §2.1.8).
This is the value type for the relatedTo property on a ContactCard.
Each map key is the uid of the related Card; each value is a
Relation object describing the relationship.
Distinct from the JSCalendar RFC 8984 §1.4.10 type
jmap_jscalendar_types::Relation:
that type relates JSCalendar entries (events, tasks) via UID and
has a different relation enumeration; this Relation relates
JSContact Cards.
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 "Relation" when present per RFC 9553 §1.3.4 (may be omitted in defaultType positions).
relation: Option<HashMap<String, bool>>Set of relation types (key → true). Initial enumerated values:
"acquaintance", "agent", "child", "co-resident",
"co-worker", "colleague", "contact", "crush", "date",
"emergency", "friend", "kin", "me", "met", "muse",
"neighbor", "parent", "sibling", "spouse", "sweetheart".
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).