#[non_exhaustive]pub struct StateChange {
pub changed: BTreeMap<Id, BTreeMap<String, State>>,
pub extra: Map<String, Value>,
}Expand description
A state change push notification (RFC 8620 §7.1).
Sent by the server over SSE, WebSocket, or to a PushSubscription URL.
The wire form always carries "@type": "StateChange" (RFC 8620 §7.1):
serialize always emits it; deserialize rejects any other value, accepts
its absence and never leaves it in extra.
§extra equality is feature-flag-dependent (bd:JMAP-6r7c.43)
The derived PartialEq / Eq impl compares extra as a
serde_json::Map, which is order-insensitive under the workspace default
(BTreeMap-backed) and order-sensitive if any crate in the dependency graph
enables serde_json/preserve_order.
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.changed: BTreeMap<Id, BTreeMap<String, State>>For each account that changed: maps data-type name to the new State token.
Outer key: account Id. Inner key: JMAP data-type name (e.g. "Email").
Inner value: new opaque state string; pass to Email/changes etc. as sinceState.
extra: Map<String, Value>Catch-all for vendor / site / private extension fields not covered
by the typed fields above. Preserves unknown fields across
deserialize/serialize round-trip per workspace extras-preservation
policy (see workspace AGENTS.md). Never contains @type.