#[non_exhaustive]pub enum HttpRequestError {
Offline,
NoRoute,
ConnectionRefused,
Timeout,
ResponseTooBig,
ServerError {
status_code: u16,
response: Bytes,
},
Other {
reason: String,
},
}Expand description
Possible errors that may happen during an HTTP request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
source§impl Clone for HttpRequestError
impl Clone for HttpRequestError
source§fn clone(&self) -> HttpRequestError
fn clone(&self) -> HttpRequestError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for HttpRequestError
impl Debug for HttpRequestError
source§impl<'de> Deserialize<'de> for HttpRequestError
impl<'de> Deserialize<'de> for HttpRequestError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<HttpRequestError> for Error
impl From<HttpRequestError> for Error
source§fn from(error: HttpRequestError) -> Self
fn from(error: HttpRequestError) -> Self
Converts to this type from the input type.
source§impl PartialEq for HttpRequestError
impl PartialEq for HttpRequestError
source§fn eq(&self, other: &HttpRequestError) -> bool
fn eq(&self, other: &HttpRequestError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for HttpRequestError
impl Serialize for HttpRequestError
impl Eq for HttpRequestError
impl StructuralPartialEq for HttpRequestError
Auto Trait Implementations§
impl !Freeze for HttpRequestError
impl RefUnwindSafe for HttpRequestError
impl Send for HttpRequestError
impl Sync for HttpRequestError
impl Unpin for HttpRequestError
impl UnwindSafe for HttpRequestError
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