pub enum WsError {
AuthMissing,
AuthInvalid,
TooManyConnections,
BroadcastFull,
InvalidMessage,
Compression,
PayloadTooLarge,
Redis(String),
Closed,
}Expand description
WebSocket error variants.
Each variant maps to a failure mode encountered during authentication, connection management, or message handling.
Variants§
AuthMissing
No authentication token was provided.
AuthInvalid
Provided authentication token is invalid or expired.
TooManyConnections
Connection limit reached.
BroadcastFull
Broadcast channel is full or lagged.
InvalidMessage
Incoming message could not be parsed or is semantically invalid.
Compression
A compressed payload was malformed: bad envelope flags, corrupt deflate stream, or invalid UTF-8 for a text frame.
PayloadTooLarge
A payload exceeded the configured size limit — for decompression this
is the decompression-bomb guard (CompressionConfig::max_size).
Redis(String)
Redis (multi-node room fan-out) transport failure. The underlying
redis::RedisError is flattened to its display form to keep
WsError Clone + Eq (0.4.0 redis feature).
Closed
Connection has been closed.
Trait Implementations§
impl Eq for WsError
Source§impl Error for WsError
impl Error for WsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()