#[non_exhaustive]pub enum WsFrame {
StateChange(StateChange),
Response(JmapResponse),
Unknown {
type_name: String,
},
}Expand description
A parsed frame received from the JMAP WebSocket.
Marked #[non_exhaustive] because the spec may define additional
@type values in future revisions.
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)
RFC 8620 §7.1 StateChange — one or more object types have changed state; client must re-fetch the affected data types.
Response(JmapResponse)
RFC 8887 Response — reply to a JMAP request sent on this connection.
Unknown
Unrecognized @type — silently ignored per forward-compatibility rules
(RFC 8887 §4.3.1: clients SHOULD ignore unknown message types).
Also produced when a known type ("Response" or "StateChange") fails
to deserialize — type_name will be "Response" or "StateChange" in
that case, which can signal server misbehavior or a schema version
mismatch. Callers that log unknown frames should check for these names.
Trait Implementations§
impl StructuralPartialEq for WsFrame
Auto Trait Implementations§
impl Freeze for WsFrame
impl RefUnwindSafe for WsFrame
impl Send for WsFrame
impl Sync for WsFrame
impl Unpin for WsFrame
impl UnsafeUnpin for WsFrame
impl UnwindSafe for WsFrame
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