@@ -970,28 +970,28 @@ impl<RpcMiddleware, HttpMiddleware> TowerService<RpcMiddleware, HttpMiddleware>
970
970
}
971
971
}
972
972
973
- impl < Body , RpcMiddleware , HttpMiddleware > Service < HttpRequest < Body > > for TowerService < RpcMiddleware , HttpMiddleware >
973
+ impl < RequestBody , ResponseBody , RpcMiddleware , HttpMiddleware > Service < HttpRequest < RequestBody > > for TowerService < RpcMiddleware , HttpMiddleware >
974
974
where
975
975
RpcMiddleware : for < ' a > tower:: Layer < RpcService > + Clone ,
976
976
<RpcMiddleware as Layer < RpcService > >:: Service : Send + Sync + ' static ,
977
977
for < ' a > <RpcMiddleware as Layer < RpcService > >:: Service : RpcServiceT < ' a > ,
978
978
HttpMiddleware : Layer < TowerServiceNoHttp < RpcMiddleware > > + Send + ' static ,
979
979
<HttpMiddleware as Layer < TowerServiceNoHttp < RpcMiddleware > > >:: Service :
980
- Send + Service < HttpRequest < Body > , Response = HttpResponse , Error = Box < ( dyn StdError + Send + Sync + ' static ) > > ,
981
- <<HttpMiddleware as Layer < TowerServiceNoHttp < RpcMiddleware > > >:: Service as Service < HttpRequest < Body > > >:: Future :
980
+ Send + Service < HttpRequest < RequestBody > , Response = HttpResponse < ResponseBody > , Error = Box < ( dyn StdError + Send + Sync + ' static ) > > ,
981
+ <<HttpMiddleware as Layer < TowerServiceNoHttp < RpcMiddleware > > >:: Service as Service < HttpRequest < RequestBody > > >:: Future :
982
982
Send + ' static ,
983
- Body : http_body:: Body < Data = Bytes > + Send + ' static ,
984
- Body :: Error : Into < BoxError > ,
983
+ RequestBody : http_body:: Body < Data = Bytes > + Send + ' static ,
984
+ RequestBody :: Error : Into < BoxError > ,
985
985
{
986
- type Response = HttpResponse ;
986
+ type Response = HttpResponse < ResponseBody > ;
987
987
type Error = BoxError ;
988
988
type Future = Pin < Box < dyn Future < Output = Result < Self :: Response , Self :: Error > > + Send > > ;
989
989
990
990
fn poll_ready ( & mut self , _cx : & mut std:: task:: Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
991
991
Poll :: Ready ( Ok ( ( ) ) )
992
992
}
993
993
994
- fn call ( & mut self , request : HttpRequest < Body > ) -> Self :: Future {
994
+ fn call ( & mut self , request : HttpRequest < RequestBody > ) -> Self :: Future {
995
995
Box :: pin ( self . http_middleware . service ( self . rpc_middleware . clone ( ) ) . call ( request) )
996
996
}
997
997
}
0 commit comments