readability/
error.rs

1use std::{borrow::Cow, io};
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum ReadabilityError {
6    #[error("Can't parse url: {0:?}")]
7    ParseUrl(#[from] url::ParseError),
8    #[error("Can't parse HTML: {0:?}")]
9    ParseHtml(Vec<Cow<'static, str>>),
10    #[error("Can't read/write HTML: {0:?}")]
11    ReadWriteHtml(#[from] io::Error),
12    #[error("Can't fetch url")]
13    FetchUrl,
14    #[error("Unexpected error")]
15    Unexpected,
16}