Change routing DSL

This commit is contained in:
David Pedersen
2021-06-04 01:00:48 +02:00
parent e156bc40e1
commit c3977d0b71
8 changed files with 736 additions and 1014 deletions
+2 -2
View File
@@ -143,11 +143,11 @@ impl<S, T> Layered<S, T> {
}
}
pub fn handle_error<F, B, Res>(self, f: F) -> Layered<HandleError<S, F, S::Error>, T>
pub fn handle_error<F, B, Res>(self, f: F) -> Layered<HandleError<S, F>, T>
where
S: Service<Request<Body>, Response = Response<B>>,
F: FnOnce(S::Error) -> Res,
Res: IntoResponse<Body>,
Res: IntoResponse<B>,
B: http_body::Body<Data = Bytes> + Send + Sync + 'static,
B::Error: Into<BoxError> + Send + Sync + 'static,
{