web_parser/
error.rs

1use macron::{ Display, Error, From };
2
3/// The std result
4pub type StdResult<T, E> = std::result::Result<T, E>;
5/// The result alias
6pub type Result<T> = StdResult<T, Box<dyn std::error::Error + Send + Sync + 'static>>;
7
8/// The application error
9#[derive(Debug, Display, Error, From)]
10#[from(scraper::error::SelectorErrorKind<'static>, "Self::Scraper(value.to_string())")]
11pub enum Error {
12    #[from]
13    String(String),
14
15    Scraper(String),
16
17    #[display = "Failed to get a search results. Report about this problem to me: https://t.me/fuderis"]
18    FailedGetResults,
19
20    #[display = "Chromedriver session is broken!"]
21    SessionBroken
22}