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
//! jmap-metadata-client — JMAP Object Metadata extension method implementations.
//!
//! Implements the client-side method bindings for
//! [draft-ietf-jmap-metadata-01](https://www.ietf.org/archive/id/draft-ietf-jmap-metadata-01.txt).
//! Depends on `jmap-base-client` for transport, auth, and session, and on
//! `jmap-metadata-types` for the wire types.
//!
//! Cookie-cut from `jmap-mail-client` (canonical extension-client template
//! per workspace AGENTS.md).
//!
//! # Usage
//!
//! ```rust,no_run
//! # use jmap_metadata_client::JmapMetadataExt;
//! # async fn example(client: jmap_base_client::JmapClient) -> Result<(), jmap_base_client::ClientError> {
//! let session = client.fetch_session().await?;
//! let sc = client.with_metadata_session(session);
//! // Fetch all Metadata objects in the account.
//! let metadata = sc.metadata_get(None, None).await?;
//! # let _ = metadata;
//! # Ok(())
//! # }
//! ```
pub use ClientError;
pub use ;
/// Extension trait adding JMAP Object Metadata (draft-ietf-jmap-metadata-01)
/// methods to [`jmap_base_client::JmapClient`].
///
/// Import this trait to use: `use jmap_metadata_client::JmapMetadataExt;`
///
/// All JMAP Metadata method calls are made through the [`SessionClient`]
/// returned by [`with_metadata_session`](JmapMetadataExt::with_metadata_session).