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
sourceimpl Debug for HyperIntoWsError
impl Debug for HyperIntoWsError
sourceimpl Display for HyperIntoWsError
impl Display for HyperIntoWsError
sourceimpl Error for HyperIntoWsError
impl Error for HyperIntoWsError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Error> for HyperIntoWsError
impl From<Error> for HyperIntoWsError
sourceimpl From<Error> for HyperIntoWsError
impl From<Error> for HyperIntoWsError
sourceimpl From<HttpCodecError> for HyperIntoWsError
impl From<HttpCodecError> for HyperIntoWsError
sourcefn from(src: HttpCodecError) -> Self
fn from(src: HttpCodecError) -> Self
Converts to this type from the input type.
sourceimpl From<HyperIntoWsError> for WebSocketOtherError
impl From<HyperIntoWsError> for WebSocketOtherError
sourcefn from(err: HyperIntoWsError) -> WebSocketOtherError
fn from(err: HyperIntoWsError) -> WebSocketOtherError
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for HyperIntoWsError
impl Send for HyperIntoWsError
impl Sync for HyperIntoWsError
impl Unpin for HyperIntoWsError
impl !UnwindSafe for HyperIntoWsError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more