1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! draft-ietf-jmap-metadata-01 §1.2.1 — capability registration and
//! account-level capability object.
//!
//! Provides [`MetadataCapability`] and the capability URI constant
//! [`JMAP_METADATA_URI`].
use ;
/// The JMAP capability URI for the Metadata extension
/// (draft-ietf-jmap-metadata-01 §1.2.1).
///
/// Present as a key in both the session-level `capabilities` object (value:
/// empty object) and in each account's `accountCapabilities` object (value:
/// a [`MetadataCapability`]).
pub const JMAP_METADATA_URI: &str = "urn:ietf:params:jmap:metadata";
/// Account-level capability for the JMAP Metadata extension
/// (draft-ietf-jmap-metadata-01 §1.2.1).
///
/// The value of the `urn:ietf:params:jmap:metadata` key in
/// `accountCapabilities`.
///
/// ## Nullable fields
///
/// Fields typed `Option<T>` with no `skip_serializing_if` are
/// **required-and-nullable**: they MUST appear in the wire JSON even when
/// the value is `null`. For [`data_types`](Self::data_types) and
/// [`max_depth`](Self::max_depth) a `null` wire value carries spec-defined
/// semantics ("all data types" / "no nesting limit"), so the `null` cannot
/// be elided.
///
/// ## `maySetPrivate` default
///
/// Per §1.2.1 the default is `true`. This crate represents the field as
/// `Option<bool>` so callers can distinguish an explicit `false` from
/// "absent" if needed; deserialising a JSON document without the key
/// leaves the field as `None`. A `None` value is wire-equivalent to the
/// spec default of `true`.