Expand description
Shared JMAP wire types for RFC 8620.
Provides Id, UTCDate, State, JmapError,
JmapRequest, JmapResponse, Filter, and ResultReference —
the primitives shared by all crates in the jmap-* family.
This crate is types-only: no method handlers, no async, no network I/O.
It is the root dependency for jmap-mail-types, jmap-chat-types, and
all server and client crates in the family.
All types implement serde::Serialize and serde::Deserialize with the
camelCase field names required by the JMAP wire format.
§Example
use jmap_types::JmapRequest;
let json = r#"{
"using": ["urn:ietf:params:jmap:core"],
"methodCalls": [["Mailbox/get", {"accountId": "a1"}, "c0"]]
}"#;
let req: JmapRequest = serde_json::from_str(json).unwrap();
assert_eq!(req.using[0], "urn:ietf:params:jmap:core");
assert_eq!(req.method_calls[0].0, "Mailbox/get");Re-exports§
pub use backend::GetObject;pub use backend::JmapObject;pub use backend::QueryObject;pub use backend::SetObject;pub use error::JmapError;pub use id::Date;pub use id::Id;pub use id::State;pub use id::UTCDate;pub use query::Filter;pub use query::FilterOperator;pub use query::Operator;pub use resultref::Argument;pub use resultref::ResultReference;pub use wire::Invocation;pub use wire::JmapRequest;pub use wire::JmapResponse;
Modules§
- backend
- Backend marker traits shared across all JMAP server crates.
- error
- RFC 8620 §3.6 JMAP method-level error type (
JmapError). - id
- RFC 8620 §1.2/§1.4 opaque string newtypes:
Id,UTCDate,Date,State. - query
- RFC 8620 §5.5 generic filter types for JMAP
/querymethods. - resultref
- RFC 8620 §7 ResultReference — back-references between method calls in a batch.
- wire
- RFC 8620 §3 JMAP request/response envelope types (
JmapRequest,JmapResponse,Invocation).