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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more