Skip to main content

Module message

Module message 

Source
Expand description

Message/* method handlers (draft-atwood-jmap-chat-00 §Message).

§Wire-shape contract

Every handle_* function in this module conforms to the canonical JMAP method shape. The args: serde_json::Value parameter MUST be a JSON Object whose fields match the corresponding RFC 8620 §5 method shape (/get → §5.1, /changes → §5.2, /set → §5.3, /query → §5.5, /queryChanges → §5.6), with the type-specific arguments defined by draft-atwood-jmap-chat-00 §Message. The returned Value is the corresponding method-response object per the same section refs.

The returned Vec<Invocation> carries any back-reference invocations that this handler injected into the request stream (RFC 8620 §6.3); for the handlers in this module the vector is always empty.

Each handler returns Err(JmapError) for method-level failures (accountNotFound, invalidArguments, stateMismatch, serverFail, unsupportedFilter, unsupportedSort, cannotCalculateChanges — per RFC 8620 §3.6 and §5). Per-target failures inside /set (including the slow_mode_check rateLimited and reaction-patch invalidPatch paths) surface in the notCreated / notUpdated / notDestroyed maps within Ok((Value, ...)), not as Err.

Functions§

handle_message_changes
Handle a Message/changes method call (draft-atwood-jmap-chat-00 §Message).
handle_message_get
Handle a Message/get method call (draft-atwood-jmap-chat-00 §Message).
handle_message_query
Handle a Message/query method call (draft-atwood-jmap-chat-00 §Message).
handle_message_query_changes
Handle a Message/queryChanges method call (draft-atwood-jmap-chat-00 §Message).
handle_message_set
Handle a Message/set method call (draft-atwood-jmap-chat-00 §Message).