We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07f2fd1 commit 77c3b5bCopy full SHA for 77c3b5b
src/client/mod.rs
@@ -562,6 +562,26 @@ where
562
}
563
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
585
impl<C: Clone, B> Clone for Client<C, B> {
586
fn clone(&self) -> Client<C, B> {
587
Client {
0 commit comments