#[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).