use std::fmt;
pub type BoxError = Box<dyn std::error::Error + Send + Sync>;
pub type Result<T> = std::result::Result<T, BoxError>;
#[derive(Debug, Default, Copy, Clone)]
pub struct BadVersion;
impl fmt::Display for BadVersion {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("Unknown HTTP version")
}
}
impl std::error::Error for BadVersion {}
#[derive(Debug, Default, Copy, Clone)]
pub struct BadHeader;
impl fmt::Display for BadHeader {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.pad("Error parsing header value")
}
}
impl std::error::Error for BadHeader {}