pub enum HttpClientError {
InvalidApiKey,
InvalidAccessToken,
MissingEnvVar {
name: &'static str,
},
UnexpectedResponse,
RequestTimeout,
OpenApi {
code: i32,
message: String,
},
DeserializeResponseBody(Error),
SerializeRequestBody(Error),
SerializeQueryString(QsError),
BadStatus(StatusCode),
Http(Error),
}Expand description
Http client error type
Variants
InvalidApiKey
Invalid api key
InvalidAccessToken
Invalid access token
MissingEnvVar
Fields
name: &'static strVariable name
Missing environment variable
UnexpectedResponse
Unexpected response
RequestTimeout
Request timeout
OpenApi
OpenAPI error
DeserializeResponseBody(Error)
Deserialize response body
SerializeRequestBody(Error)
Serialize request body
SerializeQueryString(QsError)
Serialize query string error
BadStatus(StatusCode)
Bad status
Http(Error)
Http error
Trait Implementations
sourceimpl Debug for HttpClientError
impl Debug for HttpClientError
sourceimpl Display for HttpClientError
impl Display for HttpClientError
sourceimpl Error for HttpClientError
impl Error for HttpClientError
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<Error> for HttpClientError
impl From<Error> for HttpClientError
Auto Trait Implementations
impl !RefUnwindSafe for HttpClientError
impl Send for HttpClientError
impl Sync for HttpClientError
impl Unpin for HttpClientError
impl !UnwindSafe for HttpClientError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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