pub enum Error {
RequestError {
source: Error,
},
ResponseParsingError {
body: String,
},
HeaderConstruction {
source: InvalidHeaderValue,
},
ClientConstruction {
source: Error,
},
UrlConstruction,
}
Expand description
Contains all possible errors of the crate
Variants§
RequestError
Something went wrong during fetching of the freecurrencyapi api
ResponseParsingError
Something went wrong during the parsing of the freecurrencyapi api response.
HeaderConstruction
Something went wrong during header construction
Fields
§
source: InvalidHeaderValue
Error source
ClientConstruction
Something went wrong during http client creation
UrlConstruction
Failed to parse the request url
Trait Implementations§
Source§impl Debug for FreecurrencyapiError
impl Debug for FreecurrencyapiError
Source§impl Display for FreecurrencyapiError
impl Display for FreecurrencyapiError
Source§impl Error for FreecurrencyapiError
impl Error for FreecurrencyapiError
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<InvalidHeaderValue> for FreecurrencyapiError
impl From<InvalidHeaderValue> for FreecurrencyapiError
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FreecurrencyapiError
impl !RefUnwindSafe for FreecurrencyapiError
impl Send for FreecurrencyapiError
impl Sync for FreecurrencyapiError
impl Unpin for FreecurrencyapiError
impl !UnwindSafe for FreecurrencyapiError
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