use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("failed to build TLS connector: {0}")]
TlsBuild(#[from] boring::error::ErrorStack),
#[error("TLS handshake failed: {0}")]
TlsHandshake(#[from] tokio_boring::HandshakeError<tokio::net::TcpStream>),
#[error("http/2 handshake failed: {0}")]
Http2(#[from] http2::Error),
#[error("connection failed: {0}")]
Connect(#[from] std::io::Error),
#[error("fingerprint verification failed: {0}")]
Verify(String),
#[error("invalid url: {0}")]
InvalidUrl(String),
}
pub type Result<T> = std::result::Result<T, Error>;