#[repr(u8)]pub enum OpCode {
Show 16 variants
Continue = 0,
Text = 1,
Binary = 2,
RNC3 = 3,
RNC4 = 4,
RNC5 = 5,
RNC6 = 6,
RNC7 = 7,
Close = 8,
Ping = 9,
Pong = 10,
RC11 = 11,
RC12 = 12,
RC13 = 13,
RC14 = 14,
RC15 = 15,
}
Expand description
Defines the interpretation of the “Payload data”. If an unknown opcode is received, the receiving endpoint MUST Fail the WebSocket Connection. The following values are defined.
- x0 denotes a continuation frame
- x1 denotes a text frame
- x2 denotes a binary frame
- x3-7 are reserved for further non-control frames
- x8 denotes a connection close
- x9 denotes a ping
- xA denotes a pong
- xB-F are reserved for further control frames
Variants§
Continue = 0
- x0 denotes a continuation frame
Text = 1
- x1 denotes a text frame
Binary = 2
- x2 denotes a binary frame
RNC3 = 3
- x3-7 are reserved for further non-control frames
RNC4 = 4
- x3-7 are reserved for further non-control frames
RNC5 = 5
- x3-7 are reserved for further non-control frames
RNC6 = 6
- x3-7 are reserved for further non-control frames
RNC7 = 7
- x3-7 are reserved for further non-control frames
Close = 8
- x8 denotes a connection close
Ping = 9
- x9 denotes a ping
Pong = 10
- xA denotes a pong
RC11 = 11
- xB-F are reserved for further control frames
RC12 = 12
- xB-F are reserved for further control frames
RC13 = 13
- xB-F are reserved for further control frames
RC14 = 14
- xB-F are reserved for further control frames
RC15 = 15
- xB-F are reserved for further control frames
Implementations§
Trait Implementations§
impl Copy for OpCode
impl Eq for OpCode
impl StructuralPartialEq for OpCode
Auto Trait Implementations§
impl Freeze for OpCode
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin for OpCode
impl UnwindSafe for OpCode
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