#[non_exhaustive]pub enum Error {
Io(Error),
Disabled,
MissingHostname,
UnsupportedScheme(String),
Connect(Error),
BuildRequest(Error),
ProtocolHeader(InvalidHeaderValue),
WebSocketConnect(Error),
ConnectRejected(ConnectError),
Accept(Error),
}Expand description
Errors specific to the WebSocket fallback backend.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
The TCP socket failed to bind or connect. Not accept: a failed accept(2) is
the listener’s own to classify and retry (see crate::accept).
Disabled
WebSocket fallback was turned off via Client::enabled.
MissingHostname
The URL had no host to dial.
UnsupportedScheme(String)
The URL scheme can’t carry WebSocket. Only http, https, ws, and wss work.
Connect(Error)
The qmux handshake failed while dialing, including a non-101 upgrade response from the server.
BuildRequest(Error)
The URL couldn’t be turned into a valid WebSocket handshake request.
ProtocolHeader(InvalidHeaderValue)
An ALPN contained bytes that aren’t legal in the Sec-WebSocket-Protocol header.
WebSocketConnect(Error)
The TCP/TLS connection or the WebSocket upgrade itself failed.
ConnectRejected(ConnectError)
The server refused the connection outright, so retrying won’t help.
Accept(Error)
The qmux handshake failed while accepting an incoming connection.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()