pub enum Opcode {
Show 16 variants
Continuation = 0,
Text = 1,
Binary = 2,
Reserved3 = 3,
Reserved4 = 4,
Reserved5 = 5,
Reserved6 = 6,
Reserved7 = 7,
Close = 8,
Ping = 9,
Pong = 10,
ReservedB = 11,
ReservedC = 12,
ReservedD = 13,
ReservedE = 14,
ReservedF = 15,
}Expand description
WebSocket opcodes as defined in RFC 6455 Section 5.2
Variants§
Continuation = 0
Continuation frame
Text = 1
Text frame
Binary = 2
Binary frame
Reserved3 = 3
Reserved for future use
Reserved4 = 4
Reserved for future use
Reserved5 = 5
Reserved for future use
Reserved6 = 6
Reserved for future use
Reserved7 = 7
Reserved for future use
Close = 8
Close frame
Ping = 9
Ping frame
Pong = 10
Pong frame
ReservedB = 11
Reserved for future use
ReservedC = 12
Reserved for future use
ReservedD = 13
Reserved for future use
ReservedE = 14
Reserved for future use
ReservedF = 15
Reserved for future use
Implementations§
Source§impl Opcode
impl Opcode
Sourcepub fn is_control(&self) -> bool
pub fn is_control(&self) -> bool
Check if this is a control opcode
Sourcepub fn is_reserved(&self) -> bool
pub fn is_reserved(&self) -> bool
Check if this is a reserved opcode
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