warp_filter_request/
error.rs

1use warp::{hyper::http::Error as HyperHttpError, reject::Reject};
2
3//
4#[derive(Debug)]
5pub enum Error {
6    HyperHttpError(HyperHttpError),
7}
8impl core::fmt::Display for Error {
9    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10        write!(f, "{self:?}")
11    }
12}
13impl std::error::Error for Error {}
14
15//
16impl From<HyperHttpError> for Error {
17    fn from(err: HyperHttpError) -> Self {
18        Self::HyperHttpError(err)
19    }
20}
21
22//
23impl Reject for Error {}