#[non_exhaustive]pub struct DataTypeMetadataInfo {
pub namespaces: Vec<String>,
pub supports_vendor_namespaces: bool,
pub supports_private: bool,
pub max_depth: Option<u64>,
}Expand description
Per-data-type metadata capability advertisement (draft-ietf-jmap-metadata-04 §1.2.1).
Appears as the value in the dataTypes map within the account-level
urn:ietf:params:jmap:metadata capability object. A type that does not
appear in dataTypes does not gain the metadata or privateMetadata
properties in that account.
§Wire example (from §6.1)
{
"namespaces": ["photography"],
"supportsVendorNamespaces": false,
"supportsPrivate": false,
"maxDepth": 3
}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.namespaces: Vec<String>IANA-registered metadata namespace names supported on this data type
(§1.2.1). Each value is a registered name (lowercase US-ASCII letters,
digits, hyphens, underscores — no dot). Vendor domain-name namespaces MUST
NOT appear in this list; their support is signalled by
supports_vendor_namespaces.
supports_vendor_namespaces: boolWhether the server accepts vendor (domain-name) namespaces on this
data type (§1.2.1). Default false.
supports_private: boolWhether this account supports per-user privateMetadata on this
data type (§1.2.1). Default false.
When false, the privateMetadata property MUST be absent from
response objects of this type, all privateMetadata* filter
conditions MUST be rejected with unsupportedFilter, and any /set
targeting privateMetadata MUST be rejected with
invalidProperties.
max_depth: Option<u64>Maximum depth of a namespace value (§1.2.1, §2.1). null means
no server-enforced limit; otherwise draft-ietf-jmap-metadata-04
§1.2.1 says “the value MUST be at least 1.”
Per -04 §2.1, a scalar has depth 0, an array has the maximum depth of its elements (0 if empty), and an object has depth 1 plus the maximum depth of its member values (1 if empty). So depth 1 allows a flat namespace object and depth 2 one level of nested objects.