pub enum ClientOp {
Init(InitPayload),
Pub {
topic: String,
payload: String,
},
Sub {
sid: String,
message_name: String,
topic: String,
group: Option<String>,
},
Unsub {
sid: String,
},
}Expand description
A parsed client frame.
PUB payload is the rest of the line, not a validated JSON
object. Call type_hint_from_json when the root key is needed.
Variants§
Init(InitPayload)
Pub
PUB <topic> <payload>. topic is an identifier.
Sub
SUB <sid> <message_name> <topic> [group].
message_name is not identifier-checked. A fourth token is the
optional group; a fifth is rejected as extra fields.
Unsub
UNSUB <sid>.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientOp
impl RefUnwindSafe for ClientOp
impl Send for ClientOp
impl Sync for ClientOp
impl Unpin for ClientOp
impl UnwindSafe for ClientOp
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