pub async fn handle_changes<O: JmapObject, B: JmapBackend>(
backend: &B,
caller: &B::CallerCtx,
args: Value,
using: &[String],
) -> Result<HandlerOutput, JmapError>Expand description
Generic */changes handler (RFC 8620 §5.2).
using is the request’s capability list (crate::CallContext::using).
When it includes urn:ietf:params:jmap:metadata, the optional
ignoreMetadataOnlyChanges argument (draft-ietf-jmap-metadata-05 §3.3)
is parsed, and must be a boolean; otherwise the backend is told to
ignore metadata-only changes, because -05 §3 says such a request “MUST
behave as if ignoreMetadataOnlyChanges were true”.
updatedProperties is ChangesResult::updated_properties
(RFC 8621 §2.2, -05 §3.3), and null whenever updated is empty
(-05 §3.3: “It is always present, and is null when updated is empty”).
Backends that do not track per-property change detail MUST leave it
None: an empty array would mean “nothing about the listed objects
actually changed”.
§Errors
Method-level errors, returned as the JmapError:
invalidArgumentsifargsis not an object oraccountIdis missing or not a valid Id. Also whensinceStateis missing,maxChangesis not a positive integer, or (with the metadata capability)ignoreMetadataOnlyChangesis not a boolean.accountNotFoundif the backend reports no such account;serverFail(with a redacted description) if that check fails.cannotCalculateChangesif the backend cannot compute changes fromsinceState, including when it has more thanmaxChangesand no intermediate state; other backend failures map asBackendChangesError’sFromimpl does.