Enum ratchet_rs::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
sourceimpl Error for HttpError
impl Error for HttpError
1.30.0 · 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
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<InvalidHeader> for HttpError
impl From<InvalidHeader> for HttpError
sourcefn from(e: InvalidHeader) -> HttpError
fn from(e: InvalidHeader) -> HttpError
Converts to this type from the input type.
sourceimpl From<InvalidUri> for HttpError
impl From<InvalidUri> for HttpError
sourcefn from(e: InvalidUri) -> HttpError
fn from(e: InvalidUri) -> HttpError
Converts to this type from the input type.
impl StructuralPartialEq for HttpError
Auto Trait Implementations
impl RefUnwindSafe for HttpError
impl Send for HttpError
impl Sync for HttpError
impl Unpin for HttpError
impl UnwindSafe for HttpError
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