pub enum WsError {
Show 15 variants
ReservedBits,
BadOpcode,
Unmasked,
Masked,
FragmentedControl,
ControlTooLong,
BadLength,
FrameTooLarge,
MessageTooLarge,
UnexpectedContinuation,
ExpectedContinuation,
InvalidUtf8,
InvalidClose,
AfterClose,
Compression,
}Expand description
A protocol violation; the connection must be closed with WsError::close_code.
Variants§
ReservedBits
RSV1-3 set without a negotiated extension.
BadOpcode
A reserved opcode.
Unmasked
A frame from a client without a mask.
Masked
A frame from a server with a mask.
FragmentedControl
A control frame without FIN.
ControlTooLong
A control frame payload over 125 bytes.
BadLength
A length not in its shortest encoding, or with the top bit set.
FrameTooLarge
A frame over WsLimits::max_frame.
MessageTooLarge
A message over WsLimits::max_message.
UnexpectedContinuation
A continuation frame with no message in progress.
ExpectedContinuation
A new data frame while a fragmented message is in progress.
InvalidUtf8
Text that is not UTF-8.
InvalidClose
A close payload of one byte, or a code that may not be sent.
AfterClose
A frame after a Close.
Compression
A compressed message that doesn’t inflate (permessage-deflate).
Implementations§
Trait Implementations§
impl Copy for WsError
impl Eq for WsError
impl StructuralPartialEq for WsError
Auto Trait Implementations§
impl Forget for WsError
impl Freeze for WsError
impl Move for WsError
impl RefUnwindSafe for WsError
impl Send for WsError
impl Sync for WsError
impl Unpin for WsError
impl UnsafeUnpin for WsError
impl UnwindSafe for WsError
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