11// This file is @generated by prost-build.
2- #[ allow( clippy:: derive_partial_eq_without_eq) ]
32#[ derive( Clone , PartialEq , :: prost:: Message ) ]
43pub struct Query {
54 #[ prost( string, tag = "1" ) ]
65 pub query : :: prost:: alloc:: string:: String ,
76}
8- #[ allow( clippy:: derive_partial_eq_without_eq) ]
97#[ derive( Clone , PartialEq , :: prost:: Message ) ]
108pub struct Value {
119 #[ prost( oneof = "value::Value" , tags = "1, 2, 3, 4, 5" ) ]
1210 pub value : :: core:: option:: Option < value:: Value > ,
1311}
1412/// Nested message and enum types in `Value`.
1513pub mod value {
16- #[ allow( clippy:: derive_partial_eq_without_eq) ]
1714 #[ derive( Clone , PartialEq , :: prost:: Oneof ) ]
1815 pub enum Value {
1916 #[ prost( message, tag = "1" ) ]
@@ -28,36 +25,30 @@ pub mod value {
2825 Blob ( :: prost:: alloc:: vec:: Vec < u8 > ) ,
2926 }
3027}
31- #[ allow( clippy:: derive_partial_eq_without_eq) ]
32- #[ derive( Clone , PartialEq , :: prost:: Message ) ]
28+ #[ derive( Clone , Copy , PartialEq , :: prost:: Message ) ]
3329pub struct Null { }
34- #[ allow( clippy:: derive_partial_eq_without_eq) ]
3530#[ derive( Clone , PartialEq , :: prost:: Message ) ]
3631pub struct Row {
3732 #[ prost( message, repeated, tag = "1" ) ]
3833 pub values : :: prost:: alloc:: vec:: Vec < Value > ,
3934}
40- #[ allow( clippy:: derive_partial_eq_without_eq) ]
4135#[ derive( Clone , PartialEq , :: prost:: Message ) ]
4236pub struct Rows {
4337 #[ prost( message, repeated, tag = "1" ) ]
4438 pub rows : :: prost:: alloc:: vec:: Vec < Row > ,
4539}
46- #[ allow( clippy:: derive_partial_eq_without_eq) ]
4740#[ derive( Clone , PartialEq , :: prost:: Message ) ]
4841pub struct Error {
4942 #[ prost( string, tag = "1" ) ]
5043 pub error : :: prost:: alloc:: string:: String ,
5144}
52- #[ allow( clippy:: derive_partial_eq_without_eq) ]
5345#[ derive( Clone , PartialEq , :: prost:: Message ) ]
5446pub struct Response {
5547 #[ prost( oneof = "response::Resp" , tags = "1, 2" ) ]
5648 pub resp : :: core:: option:: Option < response:: Resp > ,
5749}
5850/// Nested message and enum types in `Response`.
5951pub mod response {
60- #[ allow( clippy:: derive_partial_eq_without_eq) ]
6152 #[ derive( Clone , PartialEq , :: prost:: Oneof ) ]
6253 pub enum Resp {
6354 #[ prost( message, tag = "1" ) ]
@@ -68,7 +59,13 @@ pub mod response {
6859}
6960/// Generated client implementations.
7061pub mod admin_shell_service_client {
71- #![ allow( unused_variables, dead_code, missing_docs, clippy:: let_unit_value) ]
62+ #![ allow(
63+ unused_variables,
64+ dead_code,
65+ missing_docs,
66+ clippy:: wildcard_imports,
67+ clippy:: let_unit_value,
68+ ) ]
7269 use tonic:: codegen:: * ;
7370 use tonic:: codegen:: http:: Uri ;
7471 #[ derive( Debug , Clone ) ]
@@ -90,8 +87,8 @@ pub mod admin_shell_service_client {
9087 where
9188 T : tonic:: client:: GrpcService < tonic:: body:: BoxBody > ,
9289 T :: Error : Into < StdError > ,
93- T :: ResponseBody : Body < Data = Bytes > + Send + ' static ,
94- <T :: ResponseBody as Body >:: Error : Into < StdError > + Send ,
90+ T :: ResponseBody : Body < Data = Bytes > + std :: marker :: Send + ' static ,
91+ <T :: ResponseBody as Body >:: Error : Into < StdError > + std :: marker :: Send ,
9592 {
9693 pub fn new ( inner : T ) -> Self {
9794 let inner = tonic:: client:: Grpc :: new ( inner) ;
@@ -116,7 +113,7 @@ pub mod admin_shell_service_client {
116113 > ,
117114 <T as tonic:: codegen:: Service <
118115 http:: Request < tonic:: body:: BoxBody > ,
119- > >:: Error : Into < StdError > + Send + Sync ,
116+ > >:: Error : Into < StdError > + std :: marker :: Send + std :: marker :: Sync ,
120117 {
121118 AdminShellServiceClient :: new ( InterceptedService :: new ( inner, interceptor) )
122119 }
@@ -162,8 +159,7 @@ pub mod admin_shell_service_client {
162159 . ready ( )
163160 . await
164161 . map_err ( |e| {
165- tonic:: Status :: new (
166- tonic:: Code :: Unknown ,
162+ tonic:: Status :: unknown (
167163 format ! ( "Service was not ready: {}" , e. into( ) ) ,
168164 )
169165 } ) ?;
@@ -180,37 +176,41 @@ pub mod admin_shell_service_client {
180176}
181177/// Generated server implementations.
182178pub mod admin_shell_service_server {
183- #![ allow( unused_variables, dead_code, missing_docs, clippy:: let_unit_value) ]
179+ #![ allow(
180+ unused_variables,
181+ dead_code,
182+ missing_docs,
183+ clippy:: wildcard_imports,
184+ clippy:: let_unit_value,
185+ ) ]
184186 use tonic:: codegen:: * ;
185187 /// Generated trait containing gRPC methods that should be implemented for use with AdminShellServiceServer.
186188 #[ async_trait]
187- pub trait AdminShellService : Send + Sync + ' static {
189+ pub trait AdminShellService : std :: marker :: Send + std :: marker :: Sync + ' static {
188190 /// Server streaming response type for the Shell method.
189191 type ShellStream : tonic:: codegen:: tokio_stream:: Stream <
190192 Item = std:: result:: Result < super :: Response , tonic:: Status > ,
191193 >
192- + Send
194+ + std :: marker :: Send
193195 + ' static ;
194196 async fn shell (
195197 & self ,
196198 request : tonic:: Request < tonic:: Streaming < super :: Query > > ,
197199 ) -> std:: result:: Result < tonic:: Response < Self :: ShellStream > , tonic:: Status > ;
198200 }
199201 #[ derive( Debug ) ]
200- pub struct AdminShellServiceServer < T : AdminShellService > {
201- inner : _Inner < T > ,
202+ pub struct AdminShellServiceServer < T > {
203+ inner : Arc < T > ,
202204 accept_compression_encodings : EnabledCompressionEncodings ,
203205 send_compression_encodings : EnabledCompressionEncodings ,
204206 max_decoding_message_size : Option < usize > ,
205207 max_encoding_message_size : Option < usize > ,
206208 }
207- struct _Inner < T > ( Arc < T > ) ;
208- impl < T : AdminShellService > AdminShellServiceServer < T > {
209+ impl < T > AdminShellServiceServer < T > {
209210 pub fn new ( inner : T ) -> Self {
210211 Self :: from_arc ( Arc :: new ( inner) )
211212 }
212213 pub fn from_arc ( inner : Arc < T > ) -> Self {
213- let inner = _Inner ( inner) ;
214214 Self {
215215 inner,
216216 accept_compression_encodings : Default :: default ( ) ,
@@ -260,8 +260,8 @@ pub mod admin_shell_service_server {
260260 impl < T , B > tonic:: codegen:: Service < http:: Request < B > > for AdminShellServiceServer < T >
261261 where
262262 T : AdminShellService ,
263- B : Body + Send + ' static ,
264- B :: Error : Into < StdError > + Send + ' static ,
263+ B : Body + std :: marker :: Send + ' static ,
264+ B :: Error : Into < StdError > + std :: marker :: Send + ' static ,
265265 {
266266 type Response = http:: Response < tonic:: body:: BoxBody > ;
267267 type Error = std:: convert:: Infallible ;
@@ -273,7 +273,6 @@ pub mod admin_shell_service_server {
273273 Poll :: Ready ( Ok ( ( ) ) )
274274 }
275275 fn call ( & mut self , req : http:: Request < B > ) -> Self :: Future {
276- let inner = self . inner . clone ( ) ;
277276 match req. uri ( ) . path ( ) {
278277 "/admin_shell.AdminShellService/Shell" => {
279278 #[ allow( non_camel_case_types) ]
@@ -304,7 +303,6 @@ pub mod admin_shell_service_server {
304303 let max_encoding_message_size = self . max_encoding_message_size ;
305304 let inner = self . inner . clone ( ) ;
306305 let fut = async move {
307- let inner = inner. 0 ;
308306 let method = ShellSvc ( inner) ;
309307 let codec = tonic:: codec:: ProstCodec :: default ( ) ;
310308 let mut grpc = tonic:: server:: Grpc :: new ( codec)
@@ -323,20 +321,25 @@ pub mod admin_shell_service_server {
323321 }
324322 _ => {
325323 Box :: pin ( async move {
326- Ok (
327- http:: Response :: builder ( )
328- . status ( 200 )
329- . header ( "grpc-status" , "12" )
330- . header ( "content-type" , "application/grpc" )
331- . body ( empty_body ( ) )
332- . unwrap ( ) ,
333- )
324+ let mut response = http:: Response :: new ( empty_body ( ) ) ;
325+ let headers = response. headers_mut ( ) ;
326+ headers
327+ . insert (
328+ tonic:: Status :: GRPC_STATUS ,
329+ ( tonic:: Code :: Unimplemented as i32 ) . into ( ) ,
330+ ) ;
331+ headers
332+ . insert (
333+ http:: header:: CONTENT_TYPE ,
334+ tonic:: metadata:: GRPC_CONTENT_TYPE ,
335+ ) ;
336+ Ok ( response)
334337 } )
335338 }
336339 }
337340 }
338341 }
339- impl < T : AdminShellService > Clone for AdminShellServiceServer < T > {
342+ impl < T > Clone for AdminShellServiceServer < T > {
340343 fn clone ( & self ) -> Self {
341344 let inner = self . inner . clone ( ) ;
342345 Self {
@@ -348,18 +351,9 @@ pub mod admin_shell_service_server {
348351 }
349352 }
350353 }
351- impl < T : AdminShellService > Clone for _Inner < T > {
352- fn clone ( & self ) -> Self {
353- Self ( Arc :: clone ( & self . 0 ) )
354- }
355- }
356- impl < T : std:: fmt:: Debug > std:: fmt:: Debug for _Inner < T > {
357- fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
358- write ! ( f, "{:?}" , self . 0 )
359- }
360- }
361- impl < T : AdminShellService > tonic:: server:: NamedService
362- for AdminShellServiceServer < T > {
363- const NAME : & ' static str = "admin_shell.AdminShellService" ;
354+ /// Generated gRPC service name
355+ pub const SERVICE_NAME : & str = "admin_shell.AdminShellService" ;
356+ impl < T > tonic:: server:: NamedService for AdminShellServiceServer < T > {
357+ const NAME : & ' static str = SERVICE_NAME ;
364358 }
365359}
0 commit comments