Expand description
JMAP PushSubscription/get and PushSubscription/set handlers.
Implements RFC 8620 §5.1: clients register a push endpoint URL; the server
delivers a verification push, and thereafter fans out StateChange events to
all verified subscriptions whose types list matches the changed data type.
§Registry architecture
The push registry lives in a OnceLock<Arc<PushState>> so the dispatch
function (which has no state parameter) can access it without threading the
handle through every call site. Call init_push_state once at server
startup before dispatching any JMAP requests.
Structs§
- Push
State - Shared push state accessible from the stateless dispatch function.
- Push
Subscription Create - Fields accepted when creating a new push subscription.
- Push
Subscription Created - Minimal object returned for a newly created subscription.
- Push
Subscription GetRequest PushSubscription/getrequest (RFC 8620 §5.1).- Push
Subscription GetResponse PushSubscription/getresponse.- Push
Subscription SetRequest PushSubscription/setrequest.- Push
Subscription SetResponse PushSubscription/setresponse.- Push
Subscription Update - Fields that may be patched on an existing push subscription.
- Push
Subscription View - The RFC 8620 §5.1 view of a
PushSubscriptionreturned to the client.
Functions§
- init_
push_ state - Install the global push state.
- push_
state - Retrieve the global push state, or
Noneif it has not been initialised. - push_
subscription_ get - Handle
PushSubscription/get. - push_
subscription_ set - Handle
PushSubscription/set. - push_
subscription_ set_ with_ state - Testable variant of
push_subscription_setthat accepts an explicitPushStaterather than reading from theOnceLock.
Type Aliases§
- Push
Registry - Registry type alias.