pub enum WsError {
InvalidUri(String),
CertFileNotFound(String),
LoadCertFailed(String),
ConnectionFailed(String),
TlsDnsFailed(String),
IOError(Box<dyn Error + Send + Sync>),
HandShakeFailed(String),
ProtocolError {
close_code: u16,
error: ProtocolError,
},
UnsupportedFrame(OpCode),
}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(Box<dyn Error + Send + Sync>)
raised by underlying stream
HandShakeFailed(String)
invalid protocol handshake
ProtocolError
websocket protocol handshake
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()
Auto Trait Implementations§
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