Type Alias soketto::handshake::http::Error

source ·
pub type Error = Error;
Expand description

A re-export of handshake::Error.

Aliased Type§

enum Error {
Show 13 variants Io(Error), UnsupportedHttpVersion, IncompleteHttpRequest, SecWebSocketKeyInvalidLength(usize), InvalidRequestMethod, HeaderNotFound(String), UnexpectedHeader(String), InvalidSecWebSocketAccept, UnsolicitedExtension, UnsolicitedProtocol, Extension(Box<dyn Error + Send + Sync>), Http(Box<dyn Error + Send + Sync>), Utf8(Utf8Error),
}

Variants§

§

Io(Error)

An I/O error has been encountered.

§

UnsupportedHttpVersion

An HTTP version =/= 1.1 was encountered.

§

IncompleteHttpRequest

An incomplete HTTP request.

§

SecWebSocketKeyInvalidLength(usize)

The value of the Sec-WebSocket-Key header is of unexpected length.

§

InvalidRequestMethod

The handshake request was not a GET request.

§

HeaderNotFound(String)

An HTTP header has not been present.

§

UnexpectedHeader(String)

An HTTP header value was not expected.

§

InvalidSecWebSocketAccept

The Sec-WebSocket-Accept header value did not match.

§

UnsolicitedExtension

The server returned an extension we did not ask for.

§

UnsolicitedProtocol

The server returned a protocol we did not ask for.

§

Extension(Box<dyn Error + Send + Sync>)

An extension produced an error while encoding or decoding.

§

Http(Box<dyn Error + Send + Sync>)

The HTTP entity could not be parsed successfully.

§

Utf8(Utf8Error)

UTF-8 decoding failed.

Trait Implementations

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for Error

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<Utf8Error> for Error

source§

fn from(e: Utf8Error) -> Self

Converts to this type from the input type.