pub enum ProtocolError {
}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 close-frame description is not valid UTF-8.
Closed
A message was encoded after a close message.
Overflow
A payload reached size limit.
ContinuationNotStarted
Continuation is not started
ContinuationStarted
Received new continuation but it is already started
Trait Implementations§
Source§impl Clone for ProtocolError
impl Clone for ProtocolError
Source§fn clone(&self) -> ProtocolError
fn clone(&self) -> ProtocolError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl 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§
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