use reqwest::Error; #[allow(dead_code)] #[derive(Debug)] pub enum ApiError { ReqwestError(Error), JsonError(serde_json::Error), } impl From for ApiError { fn from(err: Error) -> Self { ApiError::ReqwestError(err) } } impl From for ApiError { fn from(err: serde_json::Error) -> Self { ApiError::JsonError(err) } }