#[non_exhaustive]pub enum ChatWsFrame {
StateChange(StateChange),
Response(JmapResponse),
ChatTyping(ChatTypingEvent),
ChatPresence(ChatPresenceEvent),
Unknown {
type_name: String,
},
}Expand description
A parsed frame from the JMAP Chat WebSocket, including chat-specific variants.
Marked #[non_exhaustive] because the spec may define additional @type
values in future revisions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StateChange(StateChange)
RFC 8620 §7.1 StateChange — one or more object types have changed state.
Response(JmapResponse)
RFC 8887 Response — reply to a JMAP request sent on this connection.
ChatTyping(ChatTypingEvent)
Ephemeral typing indicator (draft-atwood-jmap-chat-wss-00).
Delivered only after a ChatStreamEnable subscription has been sent.
ChatPresence(ChatPresenceEvent)
Ephemeral presence update (draft-atwood-jmap-chat-wss-00).
Delivered only after a ChatStreamEnable subscription has been sent.
Unknown
Unrecognized @type — ignored per forward-compatibility rules
(clients SHOULD ignore unknown message types per RFC 8887 §4.3.1).
Also produced when a known chat type fails to deserialize — type_name
will be "ChatTypingEvent" or "ChatPresenceEvent" in that case.
Trait Implementations§
Source§impl Clone for ChatWsFrame
impl Clone for ChatWsFrame
Source§fn clone(&self) -> ChatWsFrame
fn clone(&self) -> ChatWsFrame
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more