pub enum RequestError {
InvalidHeader(String),
MissingHeader(String),
IOError(Error),
EncodingError(Utf8Error),
MissingSyncKey,
InvalidRequest(String),
}
Expand description
Request parsing Errors
Variants§
InvalidHeader(String)
Raised when a header is malformed
MissingHeader(String)
Raised with the protocol name of the missing header.
IOError(Error)
Raised when reading the Request fails
EncodingError(Utf8Error)
Raised when the Request payload is not valid utf-8
MissingSyncKey
InvalidRequest(String)
Raised when the Request is not valid but none of the Other cases is applicable
Trait Implementations§
Source§impl Debug for RequestError
impl Debug for RequestError
Source§impl Display for RequestError
impl Display for RequestError
Source§impl Error for RequestError
impl Error for RequestError
1.30.0 · 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 RequestError
impl From<Error> for RequestError
Auto Trait Implementations§
impl Freeze for RequestError
impl !RefUnwindSafe for RequestError
impl Send for RequestError
impl Sync for RequestError
impl Unpin for RequestError
impl !UnwindSafe for RequestError
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