pub enum Frame {
Text(String),
Binary(Vec<u8>),
Ping(Vec<u8>),
Pong(Vec<u8>),
Close(Option<u16>, String),
Continuation {
fin: bool,
data: Vec<u8>,
},
}Expand description
A decoded WebSocket frame.
Variants§
Text(String)
A complete UTF-8 text message (opcode 0x1).
Binary(Vec<u8>)
A binary message (opcode 0x2).
Ping(Vec<u8>)
A ping control frame (opcode 0x9). Server should respond with Pong.
Pong(Vec<u8>)
A pong control frame (opcode 0xA).
Close(Option<u16>, String)
A close control frame (opcode 0x8) with an optional status code and reason.
Continuation
A continuation fragment (opcode 0x0).
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.