#[non_exhaustive]pub enum SseEvent {
StateChange(StateChange),
Unknown {
event_type: String,
data: String,
},
}Expand description
A parsed SSE event from a JMAP event source (RFC 8620 §7.3).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
StateChange(StateChange)
A “state” event: maps accountId → (typeName → newState).
Triggers a /changes call for each type listed. Wire format:
{"@type":"StateChange","changed":{"<accountId>":{"<TypeName>":"<state>"}}}
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, "state" when the
state payload failed to parse. An empty string means the frame had
no event: field (a keepalive comment or bare data).
Callers should silently ignore this variant; log event_type when
debugging unexpected parse failures.
Trait Implementations§
impl Eq for SseEvent
impl StructuralPartialEq for SseEvent
Auto Trait Implementations§
impl Freeze for SseEvent
impl RefUnwindSafe for SseEvent
impl Send for SseEvent
impl Sync for SseEvent
impl Unpin for SseEvent
impl UnsafeUnpin for SseEvent
impl UnwindSafe for SseEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more