1use macron::{ Display, Error, From };
2
3pub type StdResult<T, E> = std::result::Result<T, E>;
5pub type Result<T> = StdResult<T, Box<dyn std::error::Error + Send + Sync + 'static>>;
7
8#[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}