pub enum WsMessage {
Text(String),
Binary(Vec<u8>),
Close {
code: u16,
reason: String,
},
Ping(Vec<u8>),
Pong(Vec<u8>),
}Variants§
Text(String)
Binary(Vec<u8>)
Close
Close with optional code and reason.
Ping(Vec<u8>)
Ping with payload.
Pong(Vec<u8>)
Pong response to a Ping.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WsMessage
impl RefUnwindSafe for WsMessage
impl Send for WsMessage
impl Sync for WsMessage
impl Unpin for WsMessage
impl UnsafeUnpin for WsMessage
impl UnwindSafe for WsMessage
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