Enum ratchet_core::ProtocolError
source · pub enum ProtocolError {
Show 13 variants
Encoding,
UnknownProtocol,
OpCode(OpCodeParseErr),
UnmaskedFrame,
MaskedFrame,
FragmentedControl,
FrameOverflow,
UnknownExtension,
ContinuationNotStarted,
ContinuationAlreadyStarted,
CloseCode(u16),
ControlDataMismatch,
InvalidControlFrame,
}
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
InvalidControlFrame
An invalid control frame was received.
Trait Implementations§
source§impl Clone for ProtocolError
impl Clone for ProtocolError
source§fn clone(&self) -> ProtocolError
fn clone(&self) -> ProtocolError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProtocolError
impl Debug for ProtocolError
source§impl Display for ProtocolError
impl Display for ProtocolError
source§impl Error for ProtocolError
impl Error for ProtocolError
1.30.0 · source§fn 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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<ProtocolError> for Error
impl From<ProtocolError> for Error
source§fn from(e: ProtocolError) -> Self
fn from(e: ProtocolError) -> Self
Converts to this type from the input type.
source§impl PartialEq for ProtocolError
impl PartialEq for ProtocolError
source§fn 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 ==
.impl Copy for ProtocolError
impl Eq for ProtocolError
impl StructuralPartialEq for ProtocolError
Auto Trait Implementations§
impl Freeze for ProtocolError
impl RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl UnwindSafe for ProtocolError
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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