#[non_exhaustive]pub struct Link {
pub at_type: Option<String>,
pub kind: Option<String>,
pub uri: Option<String>,
pub media_type: Option<String>,
pub contexts: Option<HashMap<String, bool>>,
pub pref: Option<u32>,
pub label: Option<String>,
pub extra: Map<String, Value>,
}Expand description
A generic resource link associated with a Card (RFC 9553 §2.6.3).
Extends the abstract Resource type. The kind value is optional;
when set, the only enumerated value is "contact".
uri is mandatory on the wire but modelled as Option to permit
partial-response deserialization; callers building a fresh Link
MUST populate it. See the crate-level
Design: optional fields and Option<...>
section.
Distinct from JSCalendar’s Link type (jmap_jscalendar_types::Link);
the two are unrelated wire-format types.
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 "Link" when present per RFC 9553 §1.3.4 (may be omitted in defaultType positions).
kind: Option<String>Optional "contact" discriminator.
uri: Option<String>The resource URI (RFC 3986). Mandatory per RFC 9553 §1.4.4 but
modelled as Option for partial-response deserialization.
media_type: Option<String>IANA media type of the resource.
contexts: Option<HashMap<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).