#[non_exhaustive]pub struct ChatPushCapability {
pub max_snippet_bytes: u64,
pub supported_urgency_values: Vec<UrgencyLevel>,
pub max_messages_per_push: Option<u64>,
pub extra: Map<String, Value>,
}Expand description
Account-level capability object for "urn:ietf:params:jmap:chat:push".
Found at accounts[id].accountCapabilities["urn:ietf:params:jmap:chat:push"].
Spec: draft-atwood-jmap-chat-push-00
§Strictness
The struct-level #[serde(default)] is deliberately NOT present:
max_snippet_bytes and supported_urgency_values are spec-required
(draft-atwood-jmap-chat-push-00 lines 90-94). max_messages_per_push
is the only optional field (line 96) and is already Option<u64>.
A server returning {} for this capability is non-compliant; consumers
surface that via a deserialize error rather than silently defaulting
max_snippet_bytes to 0 (which would force every bodySnippet to be
truncated to nothing).
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.max_snippet_bytes: u64Maximum byte length of a bodySnippet in ChatMessagePush.
Truncation occurs on a UTF-8 boundary.
supported_urgency_values: Vec<UrgencyLevel>Supported Web Push urgency values.
MUST include at least UrgencyLevel::Normal and
UrgencyLevel::High.
Element type is UrgencyLevel rather than String so callers can
match on the typed variants directly. Canonical wire strings
("very-low", "low", "normal", "high") deserialize to typed
variants; unknown wire strings land in UrgencyLevel::Other per
the impl_string_enum! round-trip contract.
max_messages_per_push: Option<u64>Maximum number of ChatMessageEntry objects per push payload.
None means the server does not impose a bound.
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).
Trait Implementations§
Source§impl Clone for ChatPushCapability
impl Clone for ChatPushCapability
Source§fn clone(&self) -> ChatPushCapability
fn clone(&self) -> ChatPushCapability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more