pub enum Error {
InternalError(String),
InvalidRequest(String),
InvalidResponse(String),
UrlParseError(ParseError),
CredentialsConfigError(String),
JsonExceptionError(Error),
CommunicationError(Error),
ErrorResponse(DocumentedResponseValue),
InvalidResponsePayload(Error),
UnexpectedResponse(ReqwestResponse),
}
Expand description
Error produced by generated client methods.
The type parameter may be a struct if there’s a single expected error type or an enum if there are multiple valid error types. It can be the unit type if there are no structured returns expected.
Variants§
InternalError(String)
InvalidRequest(String)
The request did not conform to API requirements.
InvalidResponse(String)
The response did not conform to API requirements.
UrlParseError(ParseError)
An invalid URL was provided.
CredentialsConfigError(String)
There is an error in provided credentials.
JsonExceptionError(Error)
The request did not conform to API requirements.
CommunicationError(Error)
A server error either due to the data, or with the connection. A server error either due to the data, or with the connection.
ErrorResponse(DocumentedResponseValue)
A documented, expected error response.
InvalidResponsePayload(Error)
An expected response code whose deserialization failed.
UnexpectedResponse(ReqwestResponse)
A response not listed in the API description. This may represent a
success or failure response; check status().is_success()
.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more