pub enum WsMessage {
Text(String),
Binary(Vec<u8>),
}Expand description
A WebSocket message — either text or binary.
This is the library’s own message type, independent of any specific WebSocket implementation. Feature-gated modules convert to/from their native message types internally.
Variants§
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