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
72
73
//! draft-ietf-jmap-metadata-02 §1.2.1 — capability registration and
//! per-data-type metadata info.
//!
//! Provides [`DataTypeMetadataInfo`] and the capability URI constant
//! [`JMAP_METADATA_URI`].
use ;
/// The JMAP capability URI for the Metadata extension
/// (draft-ietf-jmap-metadata-02 §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: an object with a `dataTypes` field mapping type names to
/// [`DataTypeMetadataInfo`]).
///
/// The URI is unchanged between -01 and -02.
pub const JMAP_METADATA_URI: &str = "urn:ietf:params:jmap:metadata";
/// Per-data-type metadata capability advertisement
/// (draft-ietf-jmap-metadata-02 §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)
///
/// ```json
/// {
/// "namespaces": ["photography"],
/// "supportsVendorNamespaces": false,
/// "supportsPrivate": false,
/// "maxDepth": 3
/// }
/// ```