pub enum ProtocolError {
Show 15 variants
UnmaskedFrame,
MaskedFrame,
InvalidOpcode(u8),
ReservedBits(u8),
FragmentedControlFrame(OpCode),
InvalidLength(usize),
InvalidLengthEncoding,
InvalidCloseCode(u16),
InvalidClosePayload,
InvalidUtf8,
Closed,
Overflow,
ContinuationNotStarted,
ContinuationStarted,
InvalidCompressedData,
}Expand description
WebSocket protocol errors.
Variants§
UnmaskedFrame
Received an unmasked frame from client
MaskedFrame
Received a masked frame from server
InvalidOpcode(u8)
Encountered invalid opcode
ReservedBits(u8)
Reserved frame bits are set without a negotiated extension.
FragmentedControlFrame(OpCode)
A control frame is fragmented.
InvalidLength(usize)
Invalid control frame length
InvalidLengthEncoding
A payload length does not use its shortest valid encoding.
InvalidCloseCode(u16)
Invalid close status code.
InvalidClosePayload
Invalid close-frame payload.
InvalidUtf8
A text message or a close-frame description is not valid UTF-8.
Closed
A message was encoded after a close message.
Overflow
A frame or message payload exceeds the size limit.
ContinuationNotStarted
Continuation is not started
ContinuationStarted
Received new continuation but it is already started
InvalidCompressedData
A compressed message cannot be decompressed.
Trait Implementations§
Source§impl Clone for ProtocolError
impl Clone for ProtocolError
impl Copy for ProtocolError
Source§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)>
Returns 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 WsClientError
impl From<ProtocolError> for WsClientError
Source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Converts to this type from the input type.
Source§impl ResponseError for ProtocolError
impl ResponseError for ProtocolError
Source§fn error_response(&self) -> Response
fn error_response(&self) -> Response
Creates an HTTP response for this error. Read more
Auto Trait Implementations§
impl Freeze for ProtocolError
impl RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl UnsafeUnpin for ProtocolError
impl UnwindSafe for ProtocolError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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