pub enum OpCode {
Show 16 variants
Continue,
Text,
Binary,
Close,
Ping,
Pong,
Reserved3,
Reserved4,
Reserved5,
Reserved6,
Reserved7,
Reserved11,
Reserved12,
Reserved13,
Reserved14,
Reserved15,
}
Expand description
Operation codes defined in RFC 6455.
Variants
Continue
A continuation frame of a fragmented message.
Text
A text data frame.
Binary
A binary data frame.
Close
A close control frame.
Ping
A ping control frame.
Pong
A pong control frame.
Reserved3
A reserved op code.
Reserved4
A reserved op code.
Reserved5
A reserved op code.
Reserved6
A reserved op code.
Reserved7
A reserved op code.
Reserved11
A reserved op code.
Reserved12
A reserved op code.
Reserved13
A reserved op code.
Reserved14
A reserved op code.
Reserved15
A reserved op code.
Implementations
sourceimpl OpCode
impl OpCode
sourcepub fn is_control(self) -> bool
pub fn is_control(self) -> bool
Is this a control opcode?
sourcepub fn is_reserved(self) -> bool
pub fn is_reserved(self) -> bool
Is this opcode reserved?
Trait Implementations
sourceimpl Ord for OpCode
impl Ord for OpCode
sourceimpl PartialOrd<OpCode> for OpCode
impl PartialOrd<OpCode> for OpCode
sourcefn partial_cmp(&self, other: &OpCode) -> Option<Ordering>
fn partial_cmp(&self, other: &OpCode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for OpCode
impl Eq for OpCode
impl StructuralEq for OpCode
impl StructuralPartialEq for OpCode
Auto Trait Implementations
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin for OpCode
impl UnwindSafe for OpCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more