Skip to main content

io_jmap/
rfc9610.rs

1//! RFC 9610: JMAP for Contacts.
2
3use serde::Deserialize;
4
5pub mod address_book;
6pub mod contact_card;
7
8/// JMAP for Contacts capability (RFC 9610 §1.4.1).
9pub const JMAP_CONTACTS_CAPABILITY: &str = "urn:ietf:params:jmap:contacts";
10
11/// Value of the contacts capability in an account's `accountCapabilities`
12/// property (RFC 9610 §1.4.1).
13#[derive(Clone, Debug, Default, Deserialize)]
14#[serde(rename_all = "camelCase")]
15pub struct JmapContactsCapability {
16    /// Max number of AddressBooks assignable to a single ContactCard;
17    /// `None` for no limit.
18    #[serde(default)]
19    pub max_address_books_per_card: Option<u64>,
20    /// Whether the user may create an AddressBook in this account.
21    #[serde(default)]
22    pub may_create_address_book: bool,
23}