pub enum WebSocketUpgradeRejectionError {
MethodNotGet,
InvalidHttpVersion,
InvalidConnectionHeader,
InvalidUpgradeHeader,
InvalidWebSocketVersionHeader,
WebSocketKeyHeaderMissing,
}Available on crate features
server and ws only.Expand description
Errors while extracting WebSocketUpgrade.
Variants§
MethodNotGet
The request method must be GET
InvalidHttpVersion
The HTTP version is not supported
InvalidConnectionHeader
The Connection header is invalid
InvalidUpgradeHeader
The Upgrade header is invalid
InvalidWebSocketVersionHeader
The Sec-WebSocket-Version header is invalid
WebSocketKeyHeaderMissing
The Sec-WebSocket-Key header is missing
Trait Implementations§
Source§impl Error for WebSocketUpgradeRejectionError
impl Error for WebSocketUpgradeRejectionError
1.30.0 · 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()
Source§impl IntoResponse for WebSocketUpgradeRejectionError
impl IntoResponse for WebSocketUpgradeRejectionError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Consume self and convert it into a
ResponseAuto Trait Implementations§
impl Freeze for WebSocketUpgradeRejectionError
impl RefUnwindSafe for WebSocketUpgradeRejectionError
impl Send for WebSocketUpgradeRejectionError
impl Sync for WebSocketUpgradeRejectionError
impl Unpin for WebSocketUpgradeRejectionError
impl UnwindSafe for WebSocketUpgradeRejectionError
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