pub enum WsError {
Show 13 variants
InvalidUri(String),
UnsupportedProxy(String),
InvalidProxy(String),
CertFileNotFound(String),
LoadCertFailed(String),
ConnectionFailed(String),
TlsDnsFailed(String),
IOError(Box<dyn Error + Send + Sync>),
HandShakeFailed(String),
ProtocolError {
close_code: u16,
error: ProtocolError,
},
ProxyError(String),
InvalidConnState(ConnectionState),
UnsupportedFrame(OpCode),
}
Expand description
errors during handshake, read/write frame
Variants§
InvalidUri(String)
invalid websocket connection url
UnsupportedProxy(String)
unsupported websocket proxy
InvalidProxy(String)
invalid websocket proxy
CertFileNotFound(String)
invalid cert file path
LoadCertFailed(String)
broken certs
ConnectionFailed(String)
failed to connect websocket server
TlsDnsFailed(String)
tls session DNS is broken
IOError(Box<dyn Error + Send + Sync>)
raised by underlying stream
HandShakeFailed(String)
invalid protocol handshake
ProtocolError
websocket protocol handshake
ProxyError(String)
raised by proxy
InvalidConnState(ConnectionState)
invalid connection state
UnsupportedFrame(OpCode)
peer send a frame with unknown opcode
Trait Implementations§
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)>
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()