#[non_exhaustive]pub struct PushSubscription {
pub id: Option<Id>,
pub device_client_id: String,
pub url: Option<String>,
pub keys: Option<PushKeys>,
pub verification_code: Option<String>,
pub expires: Option<UTCDate>,
pub types: Option<Vec<String>>,
pub extra: Map<String, Value>,
}Expand description
A push subscription (RFC 8620 §7.2).
Every property other than deviceClientId is optional here because the
same type carries a create request (no id, verificationCode or
expires), a PushSubscription/get result (url and keys are never
returned, RFC 8620 §7.2.1), and the server’s stored record. None fields
are omitted on serialize; a JSON null deserializes to None.
Extension properties, such as chatPush from
draft-atwood-jmap-chat-push-00, are carried in extra.
The Debug impl redacts url, keys.auth and verificationCode.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: Option<Id>The id property: server-set and immutable.
device_client_id: StringThe deviceClientId property: identifies the client and device.
url: Option<String>The url property: absolute URL the server POSTs pushes to. The RFC
requires it to begin with "https://"; this type does not check that.
keys: Option<PushKeys>The keys property: RFC 8291 encryption keys, or None for none.
verification_code: Option<String>The verificationCode property: None until the client echoes the
code from the PushVerification.
expires: Option<UTCDate>The expires property: the server sends nothing after this time.
types: Option<Vec<String>>The types property: data types to push; None means all types.
extra: Map<String, Value>Catch-all for extension properties (e.g. chatPush) and vendor /
site / private fields not covered by the typed fields above, per
workspace extras-preservation policy (see workspace AGENTS.md).