Enum ratchet_rs::Message
source · [−]pub enum Message {
Text,
Binary,
Ping(Bytes),
Pong(Bytes),
Close(Option<CloseReason>),
}
Expand description
A received WebSocket frame.
Variants
Text
A text message.
Note
RFC6455 is not strict as to when UTF-8 validation takes place. As such, Ratchet opts to not validate the text payload and leaves it to the user to validate it once the message has been received.
Binary
A binary message.
Ping(Bytes)
A ping message.
Pong(Bytes)
A pong message.
Close(Option<CloseReason>)
A close message.
Implementations
Trait Implementations
impl StructuralPartialEq for Message
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more