pub enum WsMessage {
Text(String),
Binary(Vec<u8>),
}Expand description
A message exchanged over a WebSocket.
Variants§
Text(String)
A UTF-8 text message (RFC 6455 opcode 0x1). On receive, the payload has already been validated as UTF-8 (§8.1).
Binary(Vec<u8>)
A binary message (opcode 0x2); opaque bytes.
Implementations§
Trait Implementations§
impl Eq for WsMessage
impl StructuralPartialEq for WsMessage
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