1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
use thiserror::Error; #[derive(Error, Debug)] pub enum Error { #[error("something could not be parsed")] ParseErr, #[error("proxy client could not authenticate")] ProxyAuthErr, #[error("http transformer error")] TransformationErr, #[error(transparent)] OSSLErr(#[from] openssl::error::Error), #[error(transparent)] OSSLErrStack(#[from] openssl::error::ErrorStack), #[error(transparent)] IoErr(#[from] std::io::Error), #[error(transparent)] RustlsErr(#[from] rustls::TLSError), #[error("something went wrong in rustls")] RustlsEmptyErr, #[error("something went wrong in webpki")] WebPkiErr, #[error("something went wrong in http_types")] HttpTypeErr, #[error(transparent)] UTF8Err(#[from] std::str::Utf8Error), #[error("unknown error")] Unknown, }