#[non_exhaustive]pub enum ErrorKind {
Http(Error),
Status(Status),
InvalidAccept,
AlreadyExecuted,
ExtendedConnectUnsupported,
}websockets only.Expand description
The kind of error that occurred when attempting a websocket upgrade
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Http(Error)
an HTTP error attempting to make the request
Status(Status)
Response didn’t have the expected status (101 Switching Protocols for h1, 200 OK for h2/h3 extended CONNECT).
InvalidAccept
Response Sec-WebSocket-Accept was missing or invalid; generally a server bug
AlreadyExecuted
into_websocket was called on a Conn that had already been executed (its status is
already set). The websocket upgrade is the execution; build the conn and call
into_websocket directly without awaiting first.
ExtendedConnectUnsupported
h2 peer did not advertise SETTINGS_ENABLE_CONNECT_PROTOCOL = 1, so the extended-CONNECT
bootstrap (RFC 8441) is not available on this connection.
Also surfaced when the conn was hinted as Version::Http3: client-side WebSocket-over-h3
(RFC 9220) requires h3 DATA-frame wrapping for the post-upgrade byte channel and that
framing layer doesn’t exist yet.
Trait Implementations§
Source§impl Error for ErrorKind
impl Error for ErrorKind
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()