pub enum ExchangeRateAPIError {
HttpError(Error),
ApiError {
status: u16,
message: String,
},
ParseError(String),
}Expand description
Errors returned by the Exchange Rate API SDK.
Variants§
HttpError(Error)
An HTTP-level error from the underlying reqwest client.
ApiError
An error returned by the Exchange Rate API itself (non-2xx response).
ParseError(String)
Failed to parse the API response body.
Trait Implementations§
Source§impl Debug for ExchangeRateAPIError
impl Debug for ExchangeRateAPIError
Source§impl Display for ExchangeRateAPIError
impl Display for ExchangeRateAPIError
Source§impl Error for ExchangeRateAPIError
impl Error for ExchangeRateAPIError
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()
Source§impl From<Error> for ExchangeRateAPIError
impl From<Error> for ExchangeRateAPIError
Auto Trait Implementations§
impl Freeze for ExchangeRateAPIError
impl !RefUnwindSafe for ExchangeRateAPIError
impl Send for ExchangeRateAPIError
impl Sync for ExchangeRateAPIError
impl Unpin for ExchangeRateAPIError
impl UnsafeUnpin for ExchangeRateAPIError
impl !UnwindSafe for ExchangeRateAPIError
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