File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -562,6 +562,26 @@ where
562
562
}
563
563
}
564
564
565
+ impl < C , B > tower_service:: Service < Request < B > > for & ' _ Client < C , B >
566
+ where
567
+ C : Connect + Clone + Send + Sync + ' static ,
568
+ B : HttpBody + Send + ' static ,
569
+ B :: Data : Send ,
570
+ B :: Error : Into < Box < dyn StdError + Send + Sync > > ,
571
+ {
572
+ type Response = Response < Body > ;
573
+ type Error = crate :: Error ;
574
+ type Future = ResponseFuture ;
575
+
576
+ fn poll_ready ( & mut self , _: & mut task:: Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
577
+ Poll :: Ready ( Ok ( ( ) ) )
578
+ }
579
+
580
+ fn call ( & mut self , req : Request < B > ) -> Self :: Future {
581
+ self . request ( req)
582
+ }
583
+ }
584
+
565
585
impl < C : Clone , B > Clone for Client < C , B > {
566
586
fn clone ( & self ) -> Client < C , B > {
567
587
Client {
You can’t perform that action at this time.
0 commit comments