pub enum ControlMessage {
Hello {
protocol_version: i64,
session_id: String,
actor_id: String,
client_id: String,
cursor: i64,
latest_cursor: i64,
requires_sync: bool,
timestamp: i64,
},
Wake {
cursor: i64,
requires_pull: bool,
reason: WakeReason,
timestamp: i64,
},
Heartbeat {
timestamp: i64,
},
Ack {
cursor: i64,
},
Presence {
scope_key: String,
kind: Option<PresenceKind>,
actor_id: Option<String>,
client_id: Option<String>,
doc: Option<Value>,
error: Option<String>,
timestamp: Option<i64>,
},
Unknown(Value),
}Variants§
Hello
§8.1 connect handshake.
Fields
Wake
§8.3 wake-up (event = "sync").
Heartbeat
§8.5 heartbeat.
Ack
§8.2 client ack — the sole client→server control message.
Presence
§8.6.2 presence fanout (server→client) or a publisher-directed error.
Fields
§
kind: Option<PresenceKind>join | update | leave for a fanout; None for an error.
Unknown(Value)
Unknown JSON control event, tolerated and preserved (§8.1).
Trait Implementations§
Source§impl Clone for ControlMessage
impl Clone for ControlMessage
Source§impl Debug for ControlMessage
impl Debug for ControlMessage
Source§impl PartialEq for ControlMessage
impl PartialEq for ControlMessage
impl StructuralPartialEq for ControlMessage
Auto Trait Implementations§
impl Freeze for ControlMessage
impl RefUnwindSafe for ControlMessage
impl Send for ControlMessage
impl Sync for ControlMessage
impl Unpin for ControlMessage
impl UnsafeUnpin for ControlMessage
impl UnwindSafe for ControlMessage
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