#[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).
Trait Implementations§
Source§impl Clone for PushSubscription
impl Clone for PushSubscription
Source§impl Debug for PushSubscription
impl Debug for PushSubscription
Source§impl<'de> Deserialize<'de> for PushSubscription
impl<'de> Deserialize<'de> for PushSubscription
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PushSubscription
Source§impl JmapObject for PushSubscription
PushSubscription has no property selector enum; PushSubscription/get
takes property names directly.
impl JmapObject for PushSubscription
PushSubscription has no property selector enum; PushSubscription/get
takes property names directly.
Source§const TYPE_NAME: &'static str = "PushSubscription"
const TYPE_NAME: &'static str = "PushSubscription"
"Email", "Mailbox", "Chat").Source§const LOCALIZABLE: &'static [LocalizableProperty]
const LOCALIZABLE: &'static [LocalizableProperty]
Source§impl PartialEq for PushSubscription
impl PartialEq for PushSubscription
Source§impl Serialize for PushSubscription
impl Serialize for PushSubscription
Source§impl SetObject for PushSubscription
Property attributes from RFC 8620 §7.2 (rfc8620.txt:3593, 3597, 3618,
3623): id is “(immutable; server-set)”; deviceClientId, url and
keys are “(immutable)”; verificationCode, expires and types
carry no attribute.
impl SetObject for PushSubscription
Property attributes from RFC 8620 §7.2 (rfc8620.txt:3593, 3597, 3618,
3623): id is “(immutable; server-set)”; deviceClientId, url and
keys are “(immutable)”; verificationCode, expires and types
carry no attribute.
Source§const SERVER_SET: &'static [&'static str]
const SERVER_SET: &'static [&'static str]
/set method text never accepts from a
client, on create or update, is server-set too. Read moreSource§const CLIENT_SETTABLE: &'static [&'static str]
const CLIENT_SETTABLE: &'static [&'static str]
SERVER_SET: the ones a
client may set through /set. Read moreSource§const IMMUTABLE: &'static [&'static str]
const IMMUTABLE: &'static [&'static str]
CLIENT_SETTABLE properties the spec marks “immutable”: “The
value MUST NOT change after the object is created.” (RFC 8620 §1.1).
A property the /set method text accepts on create but not on update
is immutable too. Read more