pub enum WebSocketReceiveMessageType {
Text,
Binary,
CloseCompleted,
CloseMustReply,
Ping,
Pong,
}
Expand description
Websocket receive message type use when reading a websocket frame
Variants§
Text
A UTF8 encoded text string
Binary
Binary data
CloseCompleted
Signals that the close handshake is complete
CloseMustReply
Signals that the other party has initiated the close handshake. If you receive this message
you should respond with a WebSocketSendMessageType::CloseReply
with the same payload as
close message
Ping
A ping message that you should respond to with a WebSocketSendMessageType::Pong
message
including the same payload as the ping
Pong
A pong message in response to a ping message
Trait Implementations§
source§impl Clone for WebSocketReceiveMessageType
impl Clone for WebSocketReceiveMessageType
source§fn clone(&self) -> WebSocketReceiveMessageType
fn clone(&self) -> WebSocketReceiveMessageType
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 WebSocketReceiveMessageType
impl Debug for WebSocketReceiveMessageType
source§impl PartialEq<WebSocketReceiveMessageType> for WebSocketReceiveMessageType
impl PartialEq<WebSocketReceiveMessageType> for WebSocketReceiveMessageType
source§fn eq(&self, other: &WebSocketReceiveMessageType) -> bool
fn eq(&self, other: &WebSocketReceiveMessageType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for WebSocketReceiveMessageType
impl Eq for WebSocketReceiveMessageType
impl StructuralEq for WebSocketReceiveMessageType
impl StructuralPartialEq for WebSocketReceiveMessageType
Auto Trait Implementations§
impl RefUnwindSafe for WebSocketReceiveMessageType
impl Send for WebSocketReceiveMessageType
impl Sync for WebSocketReceiveMessageType
impl Unpin for WebSocketReceiveMessageType
impl UnwindSafe for WebSocketReceiveMessageType
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