pub enum WsError {
InvalidUri(String),
CertFileNotFound(String),
LoadCertFailed(String),
ConnectionFailed(String),
TlsDnsFailed(String),
IOError(Error),
HandShakeFailed(String),
ProtocolError {
close_code: u16,
error: ProtocolError,
},
UnsupportedFrame(OpCode),
CompressFailed(String),
DeCompressFailed(String),
}
Expand description
errors during handshake, read/write frame
Variants§
InvalidUri(String)
invalid websocket connection url
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(Error)
raised by underlying stream
HandShakeFailed(String)
invalid protocol handshake
ProtocolError
websocket protocol handshake
UnsupportedFrame(OpCode)
peer send a frame with unknown opcode
CompressFailed(String)
compress failed
DeCompressFailed(String)
decompress failed
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)>
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()
Auto Trait Implementations§
impl Freeze for WsError
impl !RefUnwindSafe for WsError
impl Send for WsError
impl Sync for WsError
impl Unpin for WsError
impl !UnwindSafe for WsError
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