#[non_exhaustive]pub enum ErrorKind {
Http(Error),
Status(Status),
InvalidAccept,
AlreadyExecuted,
ExtendedConnectUnsupported,
}Available on crate feature
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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
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)>
Returns 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 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
Mutably borrows from an owned value. Read more