Enum web_socket::MessageType
source · pub enum MessageType {
Text,
Binary,
}
Expand description
It represent the type of data that is being sent over the WebSocket connection.
Variants§
Text
Text
data is represented as a sequence of Unicode characters encoded using UTF-8 encoding.
Binary
Binary
data can be any sequence of bytes and is typically used for sending non-textual data, such as images, audio files etc…
Trait Implementations§
source§impl Clone for MessageType
impl Clone for MessageType
source§fn clone(&self) -> MessageType
fn clone(&self) -> MessageType
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 MessageType
impl Debug for MessageType
source§impl PartialEq<MessageType> for MessageType
impl PartialEq<MessageType> for MessageType
source§fn eq(&self, other: &MessageType) -> bool
fn eq(&self, other: &MessageType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.