#[non_exhaustive]pub enum WebSocketErrorKind {
ConnectionClosed,
AlreadyClosed,
Url,
Protocol,
Capacity,
Io,
Other,
}Expand description
Classification of a WebSocketError returned by WebSocketError::kind.
#[non_exhaustive] so new variants may be added in minor releases
without breaking callers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConnectionClosed
Peer cleanly closed the connection
(WebSocketError::is_connection_closed).
AlreadyClosed
Connection was already closed when the operation was attempted
— caller bug or race (WebSocketError::is_already_closed).
Url
WebSocket URL was invalid (WebSocketError::is_url).
Protocol
WebSocket protocol violation — malformed frame, invalid opcode,
etc. (WebSocketError::is_protocol).
Capacity
Frame or message exceeded a configured size limit
(WebSocketError::is_capacity).
Io
Error wraps an underlying std::io::Error
(WebSocketError::is_io).
Other
Categorisation did not match any of the variants above. May
appear for tungstenite error variants not yet covered by this
crate’s classification (e.g. Tls, Http, future additions).
Trait Implementations§
Source§impl Clone for WebSocketErrorKind
impl Clone for WebSocketErrorKind
Source§fn clone(&self) -> WebSocketErrorKind
fn clone(&self) -> WebSocketErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WebSocketErrorKind
impl Debug for WebSocketErrorKind
impl Eq for WebSocketErrorKind
Source§impl Hash for WebSocketErrorKind
impl Hash for WebSocketErrorKind
Source§impl PartialEq for WebSocketErrorKind
impl PartialEq for WebSocketErrorKind
Source§fn eq(&self, other: &WebSocketErrorKind) -> bool
fn eq(&self, other: &WebSocketErrorKind) -> bool
self and other values to be equal, and is used by ==.