pub enum CurrencyLayerError {
InvalidCurrency {
symbol: String,
},
ServerError {
code: u16,
message: String,
},
MoneyError(MoneyError),
SerdeError(Error),
ReqwestError(Error),
IoError(Error),
}
Expand description
Currency Layer errors
Variants
InvalidCurrency
Fields
symbol: String
The invalid currency symbol
This error is occur if an invalid currency symbol is provided
ServerError
Fields
code: u16
The error code returned in the message body
message: String
The returned error message
This error will occure if Currency Layer returns an error response
MoneyError(MoneyError)
SerdeError(Error)
ReqwestError(Error)
IoError(Error)
Trait Implementations
sourceimpl Debug for CurrencyLayerError
impl Debug for CurrencyLayerError
sourceimpl Display for CurrencyLayerError
impl Display for CurrencyLayerError
sourceimpl Error for CurrencyLayerError
impl Error for CurrencyLayerError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<Error> for CurrencyLayerError
impl From<Error> for CurrencyLayerError
sourceimpl From<Error> for CurrencyLayerError
impl From<Error> for CurrencyLayerError
sourceimpl From<Error> for CurrencyLayerError
impl From<Error> for CurrencyLayerError
sourceimpl From<MoneyError> for CurrencyLayerError
impl From<MoneyError> for CurrencyLayerError
sourcefn from(source: MoneyError) -> Self
fn from(source: MoneyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for CurrencyLayerError
impl Send for CurrencyLayerError
impl Sync for CurrencyLayerError
impl Unpin for CurrencyLayerError
impl !UnwindSafe for CurrencyLayerError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more