Skip to main content

handle_task_notification_changes

Function handle_task_notification_changes 

Source
pub async fn handle_task_notification_changes<B: TasksBackend>(
    backend: &B,
    caller: &B::CallerCtx,
    args: Value,
) -> Result<HandlerOutput, JmapError>
Expand description

Handle a TaskNotification/changes method call (draft-tasks-06 §5.3).

args is the RFC 8620 §5.2 /changes request shape (accountId, sinceState, optional maxChanges); the returned Value is the §5.2 /changes response shape (accountId, oldState, newState, hasMoreChanges, created, updated, destroyed).

Returns (response_args, extra_invocations). The extra list is always empty.

§Errors

Returns a method-level JmapError:

  • invalidArguments when accountId is missing or not a valid Id, sinceState is missing, or maxChanges is not a positive integer;
  • accountNotFound when the backend does not know accountId;
  • cannotCalculateChanges when the backend cannot compute the changes since sinceState;
  • serverFail when the backend fails.