parse_book_source/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum ParseError {
5 #[error(transparent)]
6 Json(#[from] serde_json::Error),
7
8 #[error(transparent)]
9 Reqwest(#[from] reqwest::Error),
10
11 #[error(transparent)]
12 Regex(#[from] regex::Error),
13
14 #[error(transparent)]
15 JsonPath(#[from] jsonpath_rust::JsonPathParserError),
16
17 #[error(transparent)]
18 IO(#[from] std::io::Error),
19
20 #[error(transparent)]
21 ParseError(#[from] std::num::ParseIntError),
22
23 #[error(transparent)]
24 OtherError(#[from] anyhow::Error),
25
26 #[error("{0}")]
27 Warning(String),
28}
29
30pub type Result<T> = std::result::Result<T, ParseError>;