Expand description
Task/* method handlers (draft-tasks-06 §4).
Task/set enforces the isDraft immutability constraint: once set to false,
it cannot be set back to true.
§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, /copy → §5.4,
/query → §5.5, /queryChanges → §5.6), with the type-specific
arguments defined by draft-tasks-06 §4. The returned Value is the
corresponding method-response object per the same section refs.
The returned HandlerOutput::extra_invocations carries any invocations
that this handler injected into the request stream (RFC 8620 §6.3).
For the standard /get, /changes, /set, /query, and
/queryChanges handlers in this module the vector is always
empty. handle_task_copy is the one exception: it MAY emit
Task/set follow-up invocations when onSuccessDestroyOriginal is
true (RFC 8620 §5.4).
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 a /set or
/copy call surface in the notCreated / notUpdated /
notDestroyed maps within Ok((Value, ...)), not as Err.
Functions§
- handle_
task_ changes - Handle a
Task/changesmethod call (draft-tasks-06 §4.6). - handle_
task_ copy - Handle a
Task/copymethod call (draft-tasks-06 §4.8). - handle_
task_ get - Handle a
Task/getmethod call (draft-tasks-06 §4.5). - handle_
task_ query - Handle a
Task/querymethod call (draft-tasks-06 §4.13). - handle_
task_ query_ changes - Handle a
Task/queryChangesmethod call (draft-tasks-06 §4.14). - handle_
task_ set - Handle a
Task/setmethod call (draft-tasks-06 §4.7).