jmap-sharing
JMAP Sharing (RFC 9670) in one dependency: re-exports
jmap-sharing-types always, jmap-sharing-client with the client
feature and jmap-sharing-server with the server feature (memory adds
the server's in-memory reference backend).
What it is
A facade with no code of its own:
| Feature | Re-export |
|---|---|
| (none) | jmap_sharing::types |
client |
jmap_sharing::client |
server |
jmap_sharing::server |
memory |
server, plus jmap_sharing::server::memory |
types: the wire types and capability constants.client: the sealedJmapSharingExtextension trait overjmap-base-client.server:Principal/*andShareNotification/*handlers overSharingBackend,register_sharing_handlers.
What it's for
Sharing defines Principals (users, groups, resources) and
ShareNotifications, which other JMAP types use to share data between
accounts. Applications that want the whole family depend on this crate and
pick client, server or both; workspace crates depend on the component
crates directly. Nothing else in the family is left out.
How to use
[]
= { = "0.6", = ["client"] }
use ;
assert_eq!;
let cap: PrincipalsCapability =
from_str.unwrap;
assert!;
How it works
Each module is a pub use of a component crate, gated by its feature, so
jmap_sharing::server::X is the same item as jmap_sharing_server::X. The
component crates version in lockstep with this one on the shared jmap-*
line.
Gotchas
serveralone does not build the reference backend; enablememoryforserver::memory::MemoryBackend(demonstration quality, not production).- Depending on this crate and on a component crate at a different version gives two copies of each type, which do not unify. Keep them on one version line.
- Version 0.6.0 replaces the 0.0.1 name-claim placeholder.