pub enum Error {
UrlCannotBeABase(Url),
QueryString(Method, Url, Box<SerdeQsError>),
Request(Method, Url, Box<ReqwestMiddlewareError>),
Serialization(Method, Url, SerdeJsonError),
Deserialization(Method, Url, StatusCode, SerdeJsonError),
Response(Method, Url, StatusCode, Pin<Box<Response>>),
}Expand description
An error which occurs when using the BasicClient
This can be a serialization problem, a problem making the request, or an unsuccessful response. Unsuccessful means any non 2xx response code.
Variants§
UrlCannotBeABase(Url)
Url cannot be a base: {0}
QueryString(Method, Url, Box<SerdeQsError>)
Query string encoding: {0} {1} => {2}
Request(Method, Url, Box<ReqwestMiddlewareError>)
Reqwest: {0} {1} => {2}
Serialization(Method, Url, SerdeJsonError)
Error serializing json for request {0} {1} => {2}
Deserialization(Method, Url, StatusCode, SerdeJsonError)
Error deserializing a response: {0} {1} => {2}: {3}
Response(Method, Url, StatusCode, Pin<Box<Response>>)
Error Response: {0} {1} => {2}
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.