pub enum HandshakeError {
GetMethodRequired,
NoWebsocketUpgrade,
NoConnectionUpgrade,
NoVersionHeader,
UnsupportedVersion,
BadWebsocketKey,
BadWebsocketProtocol,
}Expand description
Errors produced while validating a WebSocket opening handshake.
Variants§
GetMethodRequired
Only get method is allowed
NoWebsocketUpgrade
Upgrade header if not set to websocket
NoConnectionUpgrade
Connection header is not set to upgrade
NoVersionHeader
Websocket version header is not set
UnsupportedVersion
Unsupported websocket version
BadWebsocketKey
Websocket key is not set or wrong
BadWebsocketProtocol
The selected WebSocket subprotocol was not requested by the client.
Trait Implementations§
Source§impl Clone for HandshakeError
impl Clone for HandshakeError
Source§fn clone(&self) -> HandshakeError
fn clone(&self) -> HandshakeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HandshakeError
Source§impl Debug for HandshakeError
impl Debug for HandshakeError
Source§impl Display for HandshakeError
impl Display for HandshakeError
impl Eq for HandshakeError
Source§impl Error for HandshakeError
impl Error for HandshakeError
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<E> From<HandshakeError> for WsError<E>
impl<E> From<HandshakeError> for WsError<E>
Source§fn from(source: HandshakeError) -> Self
fn from(source: HandshakeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HandshakeError
impl PartialEq for HandshakeError
Source§impl ResponseError for HandshakeError
impl ResponseError for HandshakeError
Source§fn error_response(&self) -> Response
fn error_response(&self) -> Response
Creates an HTTP response for this error. Read more
impl StructuralPartialEq for HandshakeError
Source§impl<St> WebResponseError<St, DefaultError> for HandshakeError
Available on crate feature ws only.Error renderer for ws::HandshakeError
impl<St> WebResponseError<St, DefaultError> for HandshakeError
Available on crate feature
ws only.Error renderer for ws::HandshakeError
Source§fn error_response(&self, _: &St) -> HttpResponse
fn error_response(&self, _: &St) -> HttpResponse
Generate response for error Read more
Auto Trait Implementations§
impl Freeze for HandshakeError
impl RefUnwindSafe for HandshakeError
impl Send for HandshakeError
impl Sync for HandshakeError
impl Unpin for HandshakeError
impl UnsafeUnpin for HandshakeError
impl UnwindSafe for HandshakeError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.