#[non_exhaustive]pub struct WsStateChange {
pub push_state: Option<String>,
pub state_change: StateChange,
}Expand description
A push notification sent over the WebSocket (RFC 8887 §4.3.5.1): an
RFC 8620 §7.1 StateChange plus an optional pushState.
pushState “encodes the entire server state visible to the user”; a
client echoes the last one it got in WebSocketPushEnable after a
reconnect. Omitted on the wire when None.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.push_state: Option<String>pushState.
state_change: StateChangeThe RFC 8620 StateChange (changed and extension members).
Implementations§
Source§impl WsStateChange
impl WsStateChange
Sourcepub fn new(state_change: StateChange, push_state: Option<String>) -> Self
pub fn new(state_change: StateChange, push_state: Option<String>) -> Self
A push frame for state_change with token push_state.
Trait Implementations§
Source§impl Clone for WsStateChange
impl Clone for WsStateChange
Source§impl Debug for WsStateChange
impl Debug for WsStateChange
Source§impl<'de> Deserialize<'de> for WsStateChange
impl<'de> Deserialize<'de> for WsStateChange
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for WsStateChange
Source§impl PartialEq for WsStateChange
impl PartialEq for WsStateChange
Source§impl Serialize for WsStateChange
impl Serialize for WsStateChange
impl StructuralPartialEq for WsStateChange
Auto Trait Implementations§
impl Forget for WsStateChange
impl Freeze for WsStateChange
impl Move for WsStateChange
impl RefUnwindSafe for WsStateChange
impl Send for WsStateChange
impl Sync for WsStateChange
impl Unpin for WsStateChange
impl UnsafeUnpin for WsStateChange
impl UnwindSafe for WsStateChange
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