pub enum Error<T> {
Reqwest(Error),
Serde(Error),
ResponseError(ResponseContent<T>),
UnknownResponse {
is_error: bool,
status: StatusCode,
response_body: String,
},
}Expand description
Error from interacting with an API endpoint.
Variants§
Reqwest(Error)
Error from request.
Serde(Error)
Error from serde_json.
ResponseError(ResponseContent<T>)
Error response from the endpoint.
UnknownResponse
An unknown response was received.
This response was not defined by the schema.
Trait Implementations§
Source§impl<T> Error for Error<T>
impl<T> Error for Error<T>
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()
Auto Trait Implementations§
impl<T> Freeze for Error<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Error<T>
impl<T> Send for Error<T>where
T: Send,
impl<T> Sync for Error<T>where
T: Sync,
impl<T> Unpin for Error<T>where
T: Unpin,
impl<T> !UnwindSafe for Error<T>
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