#[non_exhaustive]pub struct WebDavMetadata {
pub id: Option<Id>,
pub related_type: Option<String>,
pub related_id: Id,
pub is_private: Option<bool>,
pub metadata: BTreeMap<String, String>,
pub extra: Map<String, Value>,
}Expand description
WebDAV dead-property mapping (draft-ietf-jmap-metadata-01 §2.1.3).
The @type wire value is "WebDavMetadata"; it is supplied by the
enclosing Metadata tag and does NOT appear as a field on this struct.
§relatedType constraint
Per §2.1.3 valid relatedType values include "Calendar",
"CalendarEvent", "AddressBook", "ContactCard", and "FileNode".
Servers MAY reject other values with invalidProperties. This crate
does not enforce the constraint at the type level.
§metadata key format
Per §2.2.3.1 keys MUST use the expanded-name format
"{namespace-uri}localname" (e.g.
"{http://example.com/ns}priority", "{DAV:}displayname"). Values
are either simple text or serialised XML inner content for properties
with complex structure.
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.id: Option<Id>Server-assigned identifier. Absent on create requests.
JMAP type name of the related object (e.g. "FileNode",
"Calendar", "CalendarEvent", "AddressBook", "ContactCard").
Mandatory per §2.2.1.3 on full Metadata objects, but omittable in
the §4.1 extended-/get partial-response shape. None indicates
the wire input omitted the field; consumers consuming partial
responses MAY infer the value from the request context.
Callers constructing a WebDavMetadata for Metadata/set MUST
populate this field.
Identifier of the related JMAP object.
is_private: Option<bool>Whether this metadata is private to the authenticated user.
metadata: BTreeMap<String, String>WebDAV dead properties. Keys MUST be in the expanded-name format
"{namespace-uri}localname" (§2.2.3.1). Values are simple text
for properties with text content, or serialised XML inner content
for properties with complex structure.
BTreeMap is used for deterministic serialise ordering; the wire
format is Map<String, String> either way.
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).