warp_request_body/
error.rs1use warp::{hyper::Error as HyperError, Error as WarpError};
2
3#[derive(Debug)]
5pub enum Error {
6 WarpError(WarpError),
7 HyperError(HyperError),
8}
9impl core::fmt::Display for Error {
10 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
11 write!(f, "{self:?}")
12 }
13}
14impl std::error::Error for Error {}
15
16impl From<WarpError> for Error {
18 fn from(err: WarpError) -> Self {
19 Self::WarpError(err)
20 }
21}
22
23impl From<HyperError> for Error {
25 fn from(err: HyperError) -> Self {
26 Self::HyperError(err)
27 }
28}