#[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
The h2 or h3 peer did not advertise SETTINGS_ENABLE_CONNECT_PROTOCOL = 1, so the
extended-CONNECT bootstrap (RFC 8441 over h2, RFC 9220 over h3) is not available on this
connection. Only surfaced with strict_http_version on;
otherwise the client retries as an HTTP/1.1 upgrade instead.
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()
Auto Trait Implementations§
impl !RefUnwindSafe for ErrorKind
impl !UnwindSafe for ErrorKind
impl Freeze for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more