pub enum WsHandshakeError {
CertificateStore(Error),
Url(Cow<'static, str>),
Io(Error),
Transport(Error),
Rejected {
status_code: u16,
},
Timeout(Duration),
ResolutionFailed(Error),
NoAddressFound(String),
}
Available on crate feature
ws
only.Expand description
Error that can happen during the WebSocket handshake.
If multiple IP addresses are attempted, only the last error is returned, similar to how
std::net::TcpStream::connect
behaves.
Variants§
CertificateStore(Error)
Failed to load system certs
Url(Cow<'static, str>)
Invalid URL.
Io(Error)
Error when opening the TCP socket.
Transport(Error)
Error in the transport layer.
Rejected
Server rejected the handshake.
Timeout(Duration)
Timeout while trying to connect.
ResolutionFailed(Error)
Failed to resolve IP addresses for this hostname.
NoAddressFound(String)
Couldn’t find any IP address for this hostname.
Trait Implementations§
source§impl Debug for WsHandshakeError
impl Debug for WsHandshakeError
source§impl Display for WsHandshakeError
impl Display for WsHandshakeError
source§impl Error for WsHandshakeError
impl Error for WsHandshakeError
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()
source§impl From<Error> for WsHandshakeError
impl From<Error> for WsHandshakeError
source§fn from(err: Error) -> WsHandshakeError
fn from(err: Error) -> WsHandshakeError
Converts to this type from the input type.
source§impl From<Error> for WsHandshakeError
impl From<Error> for WsHandshakeError
source§fn from(err: Error) -> WsHandshakeError
fn from(err: Error) -> WsHandshakeError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for WsHandshakeError
impl Send for WsHandshakeError
impl Sync for WsHandshakeError
impl Unpin for WsHandshakeError
impl !UnwindSafe for WsHandshakeError
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