Replies: 1 comment
-
I know the problem, because the body type returned by the buffer layer is pub struct Body(BoxBody) ;
type BoxBody = http_body_util::combinators::UnsyncBoxBody<Bytes, Error>;); while the body type required by add_service is tonic BoxBody pub type BoxBody = http_body_util::combinators::UnsyncBoxBody<bytes::Bytes, crate::Status>;
pub fn add_service<S>(&mut self, svc: S) -> Router<L>
where
S: Service<Request<BoxBody>, Response = Response<BoxBody>, Error = Infallible>
+ NamedService
+ Clone
+ Send
+ 'static,
S::Future: Send + 'static,
L: Clone,
{
Router::new(self.clone(), Routes::new(svc))
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
This is my code. I found that after I commented out the bufferlayer and rate_limit layer, the code could compile normally.
compile error:
axum version
0.7.5
Beta Was this translation helpful? Give feedback.
All reactions