pub enum HttpClientErrorWrapper<'a, H: HttpHandler> {
OtherErrors(HttpClientError<H>),
GenericApiError {
message: &'a str,
status_code: StatusCode,
},
}
Expand description
Errors with the error message returned by HttpClient
.
§Note
This enum is created because there cannot be a lifetime on HttpClientError
; the client must be able to handle the error in start()
, which cannot
be achieved with the lifetime bounded to a buffer in main()
.
Variants§
OtherErrors(HttpClientError<H>)
Other errors from HttpClientError
.
GenericApiError
Error coming from the API with message.
Fields
§
status_code: StatusCode
Status code received.
Trait Implementations§
Source§impl<'a, H: HttpHandler> Display for HttpClientErrorWrapper<'a, H>
impl<'a, H: HttpHandler> Display for HttpClientErrorWrapper<'a, H>
Source§impl<'a, H: HttpHandler> Format for HttpClientErrorWrapper<'a, H>
impl<'a, H: HttpHandler> Format for HttpClientErrorWrapper<'a, H>
Source§impl<'a, H: HttpHandler> From<HttpClientError<H>> for HttpClientErrorWrapper<'a, H>
impl<'a, H: HttpHandler> From<HttpClientError<H>> for HttpClientErrorWrapper<'a, H>
Source§fn from(source: HttpClientError<H>) -> Self
fn from(source: HttpClientError<H>) -> Self
Converts to this type from the input type.
Source§impl<H: HttpHandler> From<HttpClientErrorWrapper<'_, H>> for HttpClientError<H>
impl<H: HttpHandler> From<HttpClientErrorWrapper<'_, H>> for HttpClientError<H>
Source§fn from(err: HttpClientErrorWrapper<'_, H>) -> Self
fn from(err: HttpClientErrorWrapper<'_, H>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a, H> Freeze for HttpClientErrorWrapper<'a, H>
impl<'a, H> RefUnwindSafe for HttpClientErrorWrapper<'a, H>
impl<'a, H> Send for HttpClientErrorWrapper<'a, H>
impl<'a, H> Sync for HttpClientErrorWrapper<'a, H>
impl<'a, H> Unpin for HttpClientErrorWrapper<'a, H>
impl<'a, H> UnwindSafe for HttpClientErrorWrapper<'a, H>
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