#[non_exhaustive]pub enum ChatSseEvent {
StateChange(StateChange),
Typing {
chat_id: Id,
sender_id: Id,
typing: bool,
},
Presence {
contact_id: Id,
presence: Presence,
last_active_at: Option<String>,
status_text: Option<String>,
status_emoji: Option<String>,
},
Unknown {
event_type: String,
},
}Expand description
A parsed SSE event from the JMAP Chat event source.
Extends the base-client SseEvent with
chat-specific variants for typing indicators and presence updates.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StateChange(StateChange)
A “state” event: maps accountId → (typeName → newState).
Triggers a /changes call for each type listed.
Wire: {"@type":"StateChange","changed":{"<accountId>":{"<TypeName>":"<state>"}}}
Typing
A “typing” indicator event. Not persisted; no state token.
Wire: {"chatId":"<id>","senderId":"<id>","typing":<bool>}
Fields
Presence
A “presence” update event. Not persisted.
Wire: {"contactId":"<id>","presence":"<state>","lastActiveAt":"..."|null,...}
Fields
Unknown
Unrecognized event type, keepalive, or parse failure.
event_type carries the value of the SSE event: field for
diagnostics — e.g. "ping" for a keepalive. Callers should silently
ignore this variant and log event_type when debugging.
Trait Implementations§
Source§impl Clone for ChatSseEvent
impl Clone for ChatSseEvent
Source§fn clone(&self) -> ChatSseEvent
fn clone(&self) -> ChatSseEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more