Update http body
This commit is contained in:
@@ -25,7 +25,7 @@ pub fn client(attr: TokenStream) -> TokenStream {
|
||||
}
|
||||
|
||||
impl<T> #service_ident <T>
|
||||
where T: tonic::GrpcService<tonic::body::BoxAsyncBody>,
|
||||
where T: tonic::GrpcService<tonic::body::BoxBody>,
|
||||
T::ResponseBody: tonic::body::Body + tonic::_codegen::HttpBody + Send + 'static,
|
||||
<T::ResponseBody as tonic::_codegen::HttpBody>::Error: Into<tonic::error::Error> + Send,
|
||||
<T::ResponseBody as tonic::_codegen::HttpBody>::Data: Send, {
|
||||
@@ -36,6 +36,14 @@ pub fn client(attr: TokenStream) -> TokenStream {
|
||||
|
||||
#methods
|
||||
}
|
||||
|
||||
impl<T: Clone> Clone for #service_ident <T> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
inner: self.inner.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
TokenStream::from(output)
|
||||
|
||||
@@ -95,7 +95,7 @@ pub(crate) fn generate(service: ServiceDef) -> TokenStream {
|
||||
}
|
||||
|
||||
impl Service<http::Request<tower_h2::RecvBody>> for #service_server {
|
||||
type Response = http::Response<tonic::BoxAsyncBody>;
|
||||
type Response = http::Response<tonic::BoxBody>;
|
||||
type Error = tonic::error::Never;
|
||||
type Future = BoxFuture<Self::Response, Self::Error>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user