File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -528,6 +528,26 @@ where C: Connect + Clone + Send + Sync + 'static,
528
528
}
529
529
}
530
530
531
+ impl < C , B > tower_service:: Service < Request < B > > for Client < C , B >
532
+ where C : Connect + Clone + Send + Sync + ' static ,
533
+ C :: Transport : Unpin + Send + ' static ,
534
+ C :: Future : Unpin + Send + ' static ,
535
+ B : Payload + Unpin + Send + ' static ,
536
+ B :: Data : Send + Unpin ,
537
+ {
538
+ type Response = Response < Body > ;
539
+ type Error = crate :: Error ;
540
+ type Future = ResponseFuture ;
541
+
542
+ fn poll_ready ( & mut self , _: & mut task:: Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
543
+ Poll :: Ready ( Ok ( ( ) ) )
544
+ }
545
+
546
+ fn call ( & mut self , req : Request < B > ) -> Self :: Future {
547
+ self . request ( req)
548
+ }
549
+ }
550
+
531
551
impl < C : Clone , B > Clone for Client < C , B > {
532
552
fn clone ( & self ) -> Client < C , B > {
533
553
Client {
You can’t perform that action at this time.
0 commit comments