Enum ratchet_core::HttpError
source · pub enum HttpError {
HttpMethod(Option<String>),
Redirected(String),
Status(StatusCode),
HttpVersion(Option<u8>),
MissingHeader(HeaderName),
InvalidHeader(HeaderName),
KeyMismatch,
MalformattedUri(Option<String>),
MalformattedHeader(String),
}
Expand description
HTTP errors.
Variants§
HttpMethod(Option<String>)
An invalid HTTP method was received.
Redirected(String)
The server responded with a redirect.
Status(StatusCode)
The peer returned with a status code other than 101.
HttpVersion(Option<u8>)
An invalid HTTP version was received in a request.
MissingHeader(HeaderName)
A request or response was missing an expected header.
InvalidHeader(HeaderName)
A request or response contained an invalid header.
KeyMismatch
Sec-WebSocket-Key was invalid.
MalformattedUri(Option<String>)
The provided URI was malformatted
MalformattedHeader(String)
A provided header was malformatted
Trait Implementations§
source§impl Error for HttpError
impl Error for HttpError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<InvalidHeader> for HttpError
impl From<InvalidHeader> for HttpError
source§fn from(e: InvalidHeader) -> Self
fn from(e: InvalidHeader) -> Self
Converts to this type from the input type.
source§impl From<InvalidUri> for HttpError
impl From<InvalidUri> for HttpError
source§fn from(e: InvalidUri) -> Self
fn from(e: InvalidUri) -> Self
Converts to this type from the input type.
source§impl PartialEq for HttpError
impl PartialEq for HttpError
impl Eq for HttpError
impl StructuralPartialEq for HttpError
Auto Trait Implementations§
impl !Freeze for HttpError
impl RefUnwindSafe for HttpError
impl Send for HttpError
impl Sync for HttpError
impl Unpin for HttpError
impl UnwindSafe for HttpError
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more