Enum tokio_websockets::proto::ProtocolError
source · #[non_exhaustive]pub enum ProtocolError {
FragmentedControlFrame,
InvalidCloseCode,
InvalidOpcode,
InvalidPayloadLength,
InvalidRsv,
InvalidUtf8,
UnexpectedMaskedFrame,
UnexpectedUnmaskedFrame,
}
Expand description
Error encountered on protocol violations by the other end of the connection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FragmentedControlFrame
A fragmented control frame was received.
InvalidCloseCode
An invalid close code has been received.
InvalidOpcode
An invalid opcode was received.
InvalidPayloadLength
An invalid payload length was received.
InvalidRsv
An invalid RSV was received. This is used by extensions, which are currently unsupported.
InvalidUtf8
An invalid UTF-8 segment was received when valid UTF-8 was expected.
UnexpectedMaskedFrame
A masked frame was unexpectedly received.
UnexpectedUnmaskedFrame
An unmasked frame was unexpectedly received.
Trait Implementations§
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 Error
impl From<ProtocolError> for Error
source§fn from(err: ProtocolError) -> Self
fn from(err: ProtocolError) -> Self
Converts to this type from the input type.
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