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
74
75
76
77
78
79
80
81
82
//! jmap-contacts-client — JMAP Contacts method implementations.
//!
//! Depends on jmap-base-client for transport, auth, and session.
//! See PLAN.md for the full implementation plan.
//!
//! # Usage
//!
//! ```rust,no_run
//! # use jmap_contacts_client::JmapContactsExt;
//! # async fn example(client: jmap_base_client::JmapClient) -> Result<(), jmap_base_client::ClientError> {
//! let session = client.fetch_session().await?;
//! let sc = client.with_contacts_session(session);
//! // List all address books in the primary account.
//! let address_books = sc.address_book_get(None, None).await?;
//! # let _ = address_books;
//! # Ok(())
//! # }
//! ```
pub use ClientError;
pub use ;
/// Extension trait adding JMAP Contacts methods to [`jmap_base_client::JmapClient`].
///
/// Import this trait to use: `use jmap_contacts_client::JmapContactsExt;`
///
/// All JMAP Contacts method calls are made through the [`SessionClient`]
/// returned by [`with_contacts_session`](JmapContactsExt::with_contacts_session).
/// This trait is **sealed**: implementations outside this crate are not
/// permitted. The crate adds an `impl` only for
/// [`jmap_base_client::JmapClient`]. Sealing prevents downstream
/// divergence (e.g. `impl JmapContactsExt for MySimulator`) and keeps
/// adding methods to the trait a non-breaking change.