jmap_sharing/lib.rs
1//! JMAP Sharing
2//! ([RFC 9670](https://www.rfc-editor.org/rfc/rfc9670)):
3//! umbrella crate re-exporting the component crates, so one dependency
4//! covers them.
5//!
6//! - [`types`]: the [`jmap-sharing-types`](https://crates.io/crates/jmap-sharing-types),
7//! always enabled.
8//! - `client`: [`jmap-sharing-client`](https://crates.io/crates/jmap-sharing-client),
9//! behind the `client` feature.
10//! - `server`: [`jmap-sharing-server`](https://crates.io/crates/jmap-sharing-server),
11//! behind the `server` feature; the `memory` feature adds its in-memory
12//! reference backend.
13//!
14//! The component crates version in lockstep with this one.
15//!
16//! ```
17//! use jmap_sharing::types::{JMAP_PRINCIPALS_URI, PrincipalsCapability};
18//!
19//! assert_eq!(JMAP_PRINCIPALS_URI, "urn:ietf:params:jmap:principals");
20//! let cap: PrincipalsCapability =
21//! serde_json::from_str(r#"{"currentUserPrincipalId": "P1"}"#).unwrap();
22//! assert!(cap.current_user_principal_id.is_some());
23//! ```
24
25#![cfg_attr(docsrs, feature(doc_cfg))]
26#![forbid(unsafe_code)]
27
28pub use jmap_sharing_types as types;
29
30#[cfg(feature = "client")]
31pub use jmap_sharing_client as client;
32
33#[cfg(feature = "server")]
34pub use jmap_sharing_server as server;