Skip to main content

Module push

Module push 

Source
Expand description

RFC 8620 §7 push wire types: StateChange, PushSubscription, PushKeys, and PushVerification.

These are shared by servers (which build and send them) and clients (which receive them over SSE, WebSocket, or a push endpoint).

§The @type discriminant

StateChange and PushVerification carry an @type property that “MUST be the string” naming the object (RFC 8620 §7.1, §7.2.2). Their (De)Serialize impls are hand-written rather than derived: serialize always emits the @type string; deserialize consumes it, rejects any other value, and never leaves it in extra. An absent @type is accepted, because a receiver that dispatched on @type (or on an SSE event name) has already established what the object is.

Structs§

PushKeys
The keys object of a PushSubscription (RFC 8620 §7.2).
PushSubscription
A push subscription (RFC 8620 §7.2).
PushVerification
The object pushed to a new subscription’s URL (RFC 8620 §7.2.2).
StateChange
A state change push notification (RFC 8620 §7.1).