11#[ doc = r" Generated client implementations." ]
22pub mod debugging_client {
3- #![ allow( unused_variables, dead_code, missing_docs) ]
3+ #![ allow( unused_variables, dead_code, missing_docs, clippy :: let_unit_value ) ]
44 use tonic:: codegen:: * ;
5+ #[ derive( Debug , Clone ) ]
56 pub struct DebuggingClient < T > {
67 inner : tonic:: client:: Grpc < T > ,
78 }
@@ -19,23 +20,51 @@ pub mod debugging_client {
1920 impl < T > DebuggingClient < T >
2021 where
2122 T : tonic:: client:: GrpcService < tonic:: body:: BoxBody > ,
22- T :: ResponseBody : Body + HttpBody + Send + ' static ,
23+ T :: ResponseBody : Body + Send + ' static ,
2324 T :: Error : Into < StdError > ,
24- <T :: ResponseBody as HttpBody >:: Error : Into < StdError > + Send ,
25+ <T :: ResponseBody as Body >:: Error : Into < StdError > + Send ,
2526 {
2627 pub fn new ( inner : T ) -> Self {
2728 let inner = tonic:: client:: Grpc :: new ( inner) ;
2829 Self { inner }
2930 }
30- pub fn with_interceptor ( inner : T , interceptor : impl Into < tonic:: Interceptor > ) -> Self {
31- let inner = tonic:: client:: Grpc :: with_interceptor ( inner, interceptor) ;
32- Self { inner }
31+ pub fn with_interceptor < F > (
32+ inner : T ,
33+ interceptor : F ,
34+ ) -> DebuggingClient < InterceptedService < T , F > >
35+ where
36+ F : tonic:: service:: Interceptor ,
37+ T : tonic:: codegen:: Service <
38+ http:: Request < tonic:: body:: BoxBody > ,
39+ Response = http:: Response <
40+ <T as tonic:: client:: GrpcService < tonic:: body:: BoxBody > >:: ResponseBody ,
41+ > ,
42+ > ,
43+ <T as tonic:: codegen:: Service < http:: Request < tonic:: body:: BoxBody > > >:: Error :
44+ Into < StdError > + Send + Sync ,
45+ {
46+ DebuggingClient :: new ( InterceptedService :: new ( inner, interceptor) )
47+ }
48+ #[ doc = r" Compress requests with `gzip`." ]
49+ #[ doc = r"" ]
50+ #[ doc = r" This requires the server to support it otherwise it might respond with an" ]
51+ #[ doc = r" error." ]
52+ pub fn send_gzip ( mut self ) -> Self {
53+ self . inner = self . inner . send_gzip ( ) ;
54+ self
55+ }
56+ #[ doc = r" Enable decompressing responses with `gzip`." ]
57+ pub fn accept_gzip ( mut self ) -> Self {
58+ self . inner = self . inner . accept_gzip ( ) ;
59+ self
3360 }
3461 pub async fn call_empty (
3562 & mut self ,
36- request : impl tonic:: IntoRequest < super :: super :: super :: google:: protobuf:: Empty > ,
37- ) -> Result < tonic:: Response < super :: super :: super :: google:: protobuf:: Empty > , tonic:: Status >
38- {
63+ request : impl tonic:: IntoRequest < super :: super :: super :: super :: google:: protobuf:: Empty > ,
64+ ) -> Result <
65+ tonic:: Response < super :: super :: super :: super :: google:: protobuf:: Empty > ,
66+ tonic:: Status ,
67+ > {
3968 self . inner . ready ( ) . await . map_err ( |e| {
4069 tonic:: Status :: new (
4170 tonic:: Code :: Unknown ,
@@ -49,9 +78,11 @@ pub mod debugging_client {
4978 }
5079 pub async fn call_empty_auth (
5180 & mut self ,
52- request : impl tonic:: IntoRequest < super :: super :: super :: google:: protobuf:: Empty > ,
53- ) -> Result < tonic:: Response < super :: super :: super :: google:: protobuf:: Empty > , tonic:: Status >
54- {
81+ request : impl tonic:: IntoRequest < super :: super :: super :: super :: google:: protobuf:: Empty > ,
82+ ) -> Result <
83+ tonic:: Response < super :: super :: super :: super :: google:: protobuf:: Empty > ,
84+ tonic:: Status ,
85+ > {
5586 self . inner . ready ( ) . await . map_err ( |e| {
5687 tonic:: Status :: new (
5788 tonic:: Code :: Unknown ,
@@ -64,16 +95,4 @@ pub mod debugging_client {
6495 self . inner . unary ( request. into_request ( ) , path, codec) . await
6596 }
6697 }
67- impl < T : Clone > Clone for DebuggingClient < T > {
68- fn clone ( & self ) -> Self {
69- Self {
70- inner : self . inner . clone ( ) ,
71- }
72- }
73- }
74- impl < T > std:: fmt:: Debug for DebuggingClient < T > {
75- fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
76- write ! ( f, "DebuggingClient {{ ... }}" )
77- }
78- }
7998}
0 commit comments