pub enum HandshakeError {
UnexpectedStatus(u16),
MissingUpgrade,
MissingConnection,
InvalidAcceptKey,
MissingKey,
UnsupportedVersion,
MalformedHttp,
Io(String),
}Expand description
Handshake error.
Variants§
UnexpectedStatus(u16)
Response was not HTTP 101.
MissingUpgrade
Missing or wrong Upgrade header.
MissingConnection
Missing or wrong Connection header.
InvalidAcceptKey
Sec-WebSocket-Accept doesn’t match.
MissingKey
Missing Sec-WebSocket-Key in client request.
UnsupportedVersion
Unsupported WebSocket version.
MalformedHttp
HTTP response/request malformed or too large.
Io(String)
I/O error.
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 moreSource§impl Debug for HandshakeError
impl Debug for HandshakeError
Source§impl Display for HandshakeError
impl Display 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 From<Error> for HandshakeError
impl From<Error> for HandshakeError
Source§fn from(e: Error) -> HandshakeError
fn from(e: Error) -> HandshakeError
Converts to this type from the input type.
Source§impl From<HandshakeError> for Error
impl From<HandshakeError> for Error
Source§fn from(e: HandshakeError) -> Error
fn from(e: HandshakeError) -> Error
Converts to this type from the input type.
Source§impl PartialEq for HandshakeError
impl PartialEq for HandshakeError
Source§fn eq(&self, other: &HandshakeError) -> bool
fn eq(&self, other: &HandshakeError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for HandshakeError
impl StructuralPartialEq for HandshakeError
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