Enum ratchet_rs::ProtocolError
source · [−]pub enum ProtocolError {
Encoding,
UnknownProtocol,
OpCode(OpCodeParseErr),
UnmaskedFrame,
MaskedFrame,
FragmentedControl,
FrameOverflow,
UnknownExtension,
ContinuationNotStarted,
ContinuationAlreadyStarted,
CloseCode(u16),
ControlDataMismatch,
}
Expand description
WebSocket protocol errors.
Variants
Encoding
Invalid encoding was received.
UnknownProtocol
A peer selected a protocol that was not sent.
OpCode(OpCodeParseErr)
An invalid OpCode was received.
UnmaskedFrame
The peer sent an unmasked frame when one was expected.
MaskedFrame
The peer sent an masked frame when one was not expected.
FragmentedControl
Received a fragmented control frame
FrameOverflow
A received frame exceeded the maximum permitted size
UnknownExtension
A peer attempted to use an extension that has not been negotiated
ContinuationNotStarted
Received a continuation frame before one has been started
ContinuationAlreadyStarted
A peer attempted to start another continuation before the previous one has completed
CloseCode(u16)
Received an illegal close code
ControlDataMismatch
Received unexpected control frame data
Trait Implementations
sourceimpl Clone for ProtocolError
impl Clone for ProtocolError
sourcefn clone(&self) -> ProtocolError
fn clone(&self) -> ProtocolError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ProtocolError
impl Debug for ProtocolError
sourceimpl Display for ProtocolError
impl Display for ProtocolError
sourceimpl Error for ProtocolError
impl Error for ProtocolError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<OpCodeParseErr> for ProtocolError
impl From<OpCodeParseErr> for ProtocolError
sourcefn from(e: OpCodeParseErr) -> ProtocolError
fn from(e: OpCodeParseErr) -> ProtocolError
Converts to this type from the input type.
sourceimpl From<ProtocolError> for Error
impl From<ProtocolError> for Error
sourcefn from(e: ProtocolError) -> Error
fn from(e: ProtocolError) -> Error
Converts to this type from the input type.
sourceimpl PartialEq<ProtocolError> for ProtocolError
impl PartialEq<ProtocolError> for ProtocolError
sourcefn eq(&self, other: &ProtocolError) -> bool
fn eq(&self, other: &ProtocolError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ProtocolError) -> bool
fn ne(&self, other: &ProtocolError) -> bool
This method tests for !=
.
impl Copy for ProtocolError
impl StructuralPartialEq for ProtocolError
Auto Trait Implementations
impl RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl UnwindSafe for ProtocolError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more