1
2#[derive(Debug)]
6pub enum MetaError {
7 RequestError(reqwest::Error),
8 ParseError(serde_json::Error),
9 SomeError(&'static str),
10}
11
12impl From<serde_json::Error> for MetaError {
16 fn from(e: serde_json::Error) -> Self {
17 MetaError::ParseError(e)
18 }
19}
20
21impl From<reqwest::Error> for MetaError {
25 fn from(e: reqwest::Error) -> Self {
26 MetaError::RequestError(e)
27 }
28}
29
30impl From<&'static str> for MetaError {
34 fn from(e: &'static str) -> Self {
35 MetaError::SomeError(e)
36 }
37}