pub enum HyperIntoWsError {
MethodNotGet,
UnsupportedHttpVersion,
UnsupportedWebsocketVersion,
NoSecWsKeyHeader,
NoWsUpgradeHeader,
NoUpgradeHeader,
NoWsConnectionHeader,
NoConnectionHeader,
Io(Error),
Parsing(Error),
}
Expand description
Errors that can occur when one tries to upgrade a connection to a websocket connection.
Variants§
MethodNotGet
The HTTP method in a valid websocket upgrade request must be GET
UnsupportedHttpVersion
Currently HTTP 2 is not supported
UnsupportedWebsocketVersion
Currently only WebSocket13 is supported (RFC6455)
NoSecWsKeyHeader
A websocket upgrade request must contain a key
NoWsUpgradeHeader
A websocket upgrade request must ask to upgrade to a websocket
NoUpgradeHeader
A websocket upgrade request must contain an Upgrade
header
NoWsConnectionHeader
A websocket upgrade request’s Connection
header must be Upgrade
NoConnectionHeader
A websocket upgrade request must contain a Connection
header
Io(Error)
IO error from reading the underlying socket
Parsing(Error)
Error while parsing an incoming request
Trait Implementations§
Source§impl Debug for HyperIntoWsError
impl Debug for HyperIntoWsError
Source§impl Display for HyperIntoWsError
impl Display for HyperIntoWsError
Source§impl Error for HyperIntoWsError
impl Error for HyperIntoWsError
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 HyperIntoWsError
impl From<Error> for HyperIntoWsError
Source§impl From<Error> for HyperIntoWsError
impl From<Error> for HyperIntoWsError
Source§impl From<HttpCodecError> for HyperIntoWsError
impl From<HttpCodecError> for HyperIntoWsError
Source§fn from(src: HttpCodecError) -> Self
fn from(src: HttpCodecError) -> Self
Converts to this type from the input type.
Source§impl From<HyperIntoWsError> for WebSocketOtherError
impl From<HyperIntoWsError> for WebSocketOtherError
Source§fn from(err: HyperIntoWsError) -> WebSocketOtherError
fn from(err: HyperIntoWsError) -> WebSocketOtherError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HyperIntoWsError
impl !RefUnwindSafe for HyperIntoWsError
impl Send for HyperIntoWsError
impl Sync for HyperIntoWsError
impl Unpin for HyperIntoWsError
impl !UnwindSafe for HyperIntoWsError
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