pub enum DefillamaError {
RequestError(Error),
UrlParseError(ParseError),
ApiError(String),
ParseError(String),
MissingField(String),
Other(String),
}Expand description
Error type for the DefiLlama API client
Variants§
RequestError(Error)
Error returned by reqwest
UrlParseError(ParseError)
URL parsing error
ApiError(String)
Error returned when the API returns an error message
ParseError(String)
Error when parsing the API response
MissingField(String)
Error when a required field is missing in the response
Other(String)
Any other error
Trait Implementations§
Source§impl Debug for DefillamaError
impl Debug for DefillamaError
Source§impl Display for DefillamaError
impl Display for DefillamaError
Source§impl Error for DefillamaError
impl Error for DefillamaError
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 DefillamaError
impl From<Error> for DefillamaError
Source§impl From<ParseError> for DefillamaError
impl From<ParseError> for DefillamaError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for DefillamaError
impl !UnwindSafe for DefillamaError
impl Freeze for DefillamaError
impl Send for DefillamaError
impl Sync for DefillamaError
impl Unpin for DefillamaError
impl UnsafeUnpin for DefillamaError
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