pub enum SocketMessageData {
Text(String),
Blob(Blob),
ArrayBuffer(ArrayBuffer),
}
Expand description
Represents the types of data which can be received on a web socket. Messages
are transmitted tagged as either binary or text: text messages are always
received as strings. Binary messages may be received as either blobs or array
buffers as preferred by the receiver. This choice is indicated via the
binary_type
field on the web socket.
Variants§
Text(String)
Text message
Blob(Blob)
Binary message received as a blob
ArrayBuffer(ArrayBuffer)
Binary message received as an array buffer
Implementations§
Trait Implementations§
Source§impl Clone for SocketMessageData
impl Clone for SocketMessageData
Source§fn clone(&self) -> SocketMessageData
fn clone(&self) -> SocketMessageData
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SocketMessageData
impl Debug for SocketMessageData
Auto Trait Implementations§
impl Freeze for SocketMessageData
impl RefUnwindSafe for SocketMessageData
impl Send for SocketMessageData
impl Sync for SocketMessageData
impl Unpin for SocketMessageData
impl UnwindSafe for SocketMessageData
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