1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct AppDescriptor {
5 #[prost(message, optional, tag = "1")]
8 pub authn: ::core::option::Option<AuthnDescriptor>,
9 #[prost(message, optional, tag = "2")]
11 pub chain: ::core::option::Option<ChainDescriptor>,
12 #[prost(message, optional, tag = "3")]
14 pub codec: ::core::option::Option<CodecDescriptor>,
15 #[prost(message, optional, tag = "4")]
17 pub configuration: ::core::option::Option<ConfigurationDescriptor>,
18 #[prost(message, optional, tag = "5")]
20 pub query_services: ::core::option::Option<QueryServicesDescriptor>,
21 #[prost(message, optional, tag = "6")]
23 pub tx: ::core::option::Option<TxDescriptor>,
24}
25#[allow(clippy::derive_partial_eq_without_eq)]
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct TxDescriptor {
29 #[prost(string, tag = "1")]
33 pub fullname: ::prost::alloc::string::String,
34 #[prost(message, repeated, tag = "2")]
36 pub msgs: ::prost::alloc::vec::Vec<MsgDescriptor>,
37}
38#[allow(clippy::derive_partial_eq_without_eq)]
41#[derive(Clone, PartialEq, ::prost::Message)]
42pub struct AuthnDescriptor {
43 #[prost(message, repeated, tag = "1")]
45 pub sign_modes: ::prost::alloc::vec::Vec<SigningModeDescriptor>,
46}
47#[allow(clippy::derive_partial_eq_without_eq)]
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct SigningModeDescriptor {
54 #[prost(string, tag = "1")]
56 pub name: ::prost::alloc::string::String,
57 #[prost(int32, tag = "2")]
59 pub number: i32,
60 #[prost(string, tag = "3")]
63 pub authn_info_provider_method_fullname: ::prost::alloc::string::String,
64}
65#[allow(clippy::derive_partial_eq_without_eq)]
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct ChainDescriptor {
69 #[prost(string, tag = "1")]
71 pub id: ::prost::alloc::string::String,
72}
73#[allow(clippy::derive_partial_eq_without_eq)]
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct CodecDescriptor {
77 #[prost(message, repeated, tag = "1")]
79 pub interfaces: ::prost::alloc::vec::Vec<InterfaceDescriptor>,
80}
81#[allow(clippy::derive_partial_eq_without_eq)]
83#[derive(Clone, PartialEq, ::prost::Message)]
84pub struct InterfaceDescriptor {
85 #[prost(string, tag = "1")]
87 pub fullname: ::prost::alloc::string::String,
88 #[prost(message, repeated, tag = "2")]
91 pub interface_accepting_messages: ::prost::alloc::vec::Vec<InterfaceAcceptingMessageDescriptor>,
92 #[prost(message, repeated, tag = "3")]
94 pub interface_implementers: ::prost::alloc::vec::Vec<InterfaceImplementerDescriptor>,
95}
96#[allow(clippy::derive_partial_eq_without_eq)]
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct InterfaceImplementerDescriptor {
100 #[prost(string, tag = "1")]
102 pub fullname: ::prost::alloc::string::String,
103 #[prost(string, tag = "2")]
108 pub type_url: ::prost::alloc::string::String,
109}
110#[allow(clippy::derive_partial_eq_without_eq)]
113#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct InterfaceAcceptingMessageDescriptor {
115 #[prost(string, tag = "1")]
117 pub fullname: ::prost::alloc::string::String,
118 #[prost(string, repeated, tag = "2")]
122 pub field_descriptor_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
123}
124#[allow(clippy::derive_partial_eq_without_eq)]
126#[derive(Clone, PartialEq, ::prost::Message)]
127pub struct ConfigurationDescriptor {
128 #[prost(string, tag = "1")]
130 pub bech32_account_address_prefix: ::prost::alloc::string::String,
131}
132#[allow(clippy::derive_partial_eq_without_eq)]
134#[derive(Clone, PartialEq, ::prost::Message)]
135pub struct MsgDescriptor {
136 #[prost(string, tag = "1")]
138 pub msg_type_url: ::prost::alloc::string::String,
139}
140#[allow(clippy::derive_partial_eq_without_eq)]
142#[derive(Clone, PartialEq, ::prost::Message)]
143pub struct GetAuthnDescriptorRequest {}
144#[allow(clippy::derive_partial_eq_without_eq)]
146#[derive(Clone, PartialEq, ::prost::Message)]
147pub struct GetAuthnDescriptorResponse {
148 #[prost(message, optional, tag = "1")]
150 pub authn: ::core::option::Option<AuthnDescriptor>,
151}
152#[allow(clippy::derive_partial_eq_without_eq)]
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct GetChainDescriptorRequest {}
156#[allow(clippy::derive_partial_eq_without_eq)]
158#[derive(Clone, PartialEq, ::prost::Message)]
159pub struct GetChainDescriptorResponse {
160 #[prost(message, optional, tag = "1")]
162 pub chain: ::core::option::Option<ChainDescriptor>,
163}
164#[allow(clippy::derive_partial_eq_without_eq)]
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct GetCodecDescriptorRequest {}
168#[allow(clippy::derive_partial_eq_without_eq)]
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct GetCodecDescriptorResponse {
172 #[prost(message, optional, tag = "1")]
174 pub codec: ::core::option::Option<CodecDescriptor>,
175}
176#[allow(clippy::derive_partial_eq_without_eq)]
178#[derive(Clone, PartialEq, ::prost::Message)]
179pub struct GetConfigurationDescriptorRequest {}
180#[allow(clippy::derive_partial_eq_without_eq)]
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct GetConfigurationDescriptorResponse {
184 #[prost(message, optional, tag = "1")]
186 pub config: ::core::option::Option<ConfigurationDescriptor>,
187}
188#[allow(clippy::derive_partial_eq_without_eq)]
190#[derive(Clone, PartialEq, ::prost::Message)]
191pub struct GetQueryServicesDescriptorRequest {}
192#[allow(clippy::derive_partial_eq_without_eq)]
194#[derive(Clone, PartialEq, ::prost::Message)]
195pub struct GetQueryServicesDescriptorResponse {
196 #[prost(message, optional, tag = "1")]
198 pub queries: ::core::option::Option<QueryServicesDescriptor>,
199}
200#[allow(clippy::derive_partial_eq_without_eq)]
202#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct GetTxDescriptorRequest {}
204#[allow(clippy::derive_partial_eq_without_eq)]
206#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct GetTxDescriptorResponse {
208 #[prost(message, optional, tag = "1")]
211 pub tx: ::core::option::Option<TxDescriptor>,
212}
213#[allow(clippy::derive_partial_eq_without_eq)]
215#[derive(Clone, PartialEq, ::prost::Message)]
216pub struct QueryServicesDescriptor {
217 #[prost(message, repeated, tag = "1")]
219 pub query_services: ::prost::alloc::vec::Vec<QueryServiceDescriptor>,
220}
221#[allow(clippy::derive_partial_eq_without_eq)]
223#[derive(Clone, PartialEq, ::prost::Message)]
224pub struct QueryServiceDescriptor {
225 #[prost(string, tag = "1")]
227 pub fullname: ::prost::alloc::string::String,
228 #[prost(bool, tag = "2")]
230 pub is_module: bool,
231 #[prost(message, repeated, tag = "3")]
233 pub methods: ::prost::alloc::vec::Vec<QueryMethodDescriptor>,
234}
235#[allow(clippy::derive_partial_eq_without_eq)]
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct QueryMethodDescriptor {
241 #[prost(string, tag = "1")]
243 pub name: ::prost::alloc::string::String,
244 #[prost(string, tag = "2")]
247 pub full_query_path: ::prost::alloc::string::String,
248}
249#[cfg(feature = "grpc")]
251#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
252pub mod reflection_service_client {
253 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
254 use tonic::codegen::http::Uri;
255 use tonic::codegen::*;
256 #[derive(Debug, Clone)]
258 pub struct ReflectionServiceClient<T> {
259 inner: tonic::client::Grpc<T>,
260 }
261 #[cfg(feature = "grpc-transport")]
262 #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
263 impl ReflectionServiceClient<tonic::transport::Channel> {
264 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
266 where
267 D: std::convert::TryInto<tonic::transport::Endpoint>,
268 D::Error: Into<StdError>,
269 {
270 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
271 Ok(Self::new(conn))
272 }
273 }
274 impl<T> ReflectionServiceClient<T>
275 where
276 T: tonic::client::GrpcService<tonic::body::BoxBody>,
277 T::Error: Into<StdError>,
278 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
279 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
280 {
281 pub fn new(inner: T) -> Self {
282 let inner = tonic::client::Grpc::new(inner);
283 Self { inner }
284 }
285 pub fn with_origin(inner: T, origin: Uri) -> Self {
286 let inner = tonic::client::Grpc::with_origin(inner, origin);
287 Self { inner }
288 }
289 pub fn with_interceptor<F>(
290 inner: T,
291 interceptor: F,
292 ) -> ReflectionServiceClient<InterceptedService<T, F>>
293 where
294 F: tonic::service::Interceptor,
295 T::ResponseBody: Default,
296 T: tonic::codegen::Service<
297 http::Request<tonic::body::BoxBody>,
298 Response = http::Response<
299 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
300 >,
301 >,
302 <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
303 Into<StdError> + Send + Sync,
304 {
305 ReflectionServiceClient::new(InterceptedService::new(inner, interceptor))
306 }
307 #[must_use]
312 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
313 self.inner = self.inner.send_compressed(encoding);
314 self
315 }
316 #[must_use]
318 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
319 self.inner = self.inner.accept_compressed(encoding);
320 self
321 }
322 pub async fn get_authn_descriptor(
326 &mut self,
327 request: impl tonic::IntoRequest<super::GetAuthnDescriptorRequest>,
328 ) -> Result<tonic::Response<super::GetAuthnDescriptorResponse>, tonic::Status> {
329 self.inner.ready().await.map_err(|e| {
330 tonic::Status::new(
331 tonic::Code::Unknown,
332 format!("Service was not ready: {}", e.into()),
333 )
334 })?;
335 let codec = tonic::codec::ProstCodec::default();
336 let path = http::uri::PathAndQuery::from_static(
337 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor",
338 );
339 self.inner.unary(request.into_request(), path, codec).await
340 }
341 pub async fn get_chain_descriptor(
343 &mut self,
344 request: impl tonic::IntoRequest<super::GetChainDescriptorRequest>,
345 ) -> Result<tonic::Response<super::GetChainDescriptorResponse>, tonic::Status> {
346 self.inner.ready().await.map_err(|e| {
347 tonic::Status::new(
348 tonic::Code::Unknown,
349 format!("Service was not ready: {}", e.into()),
350 )
351 })?;
352 let codec = tonic::codec::ProstCodec::default();
353 let path = http::uri::PathAndQuery::from_static(
354 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor",
355 );
356 self.inner.unary(request.into_request(), path, codec).await
357 }
358 pub async fn get_codec_descriptor(
360 &mut self,
361 request: impl tonic::IntoRequest<super::GetCodecDescriptorRequest>,
362 ) -> Result<tonic::Response<super::GetCodecDescriptorResponse>, tonic::Status> {
363 self.inner.ready().await.map_err(|e| {
364 tonic::Status::new(
365 tonic::Code::Unknown,
366 format!("Service was not ready: {}", e.into()),
367 )
368 })?;
369 let codec = tonic::codec::ProstCodec::default();
370 let path = http::uri::PathAndQuery::from_static(
371 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor",
372 );
373 self.inner.unary(request.into_request(), path, codec).await
374 }
375 pub async fn get_configuration_descriptor(
377 &mut self,
378 request: impl tonic::IntoRequest<super::GetConfigurationDescriptorRequest>,
379 ) -> Result<tonic::Response<super::GetConfigurationDescriptorResponse>, tonic::Status>
380 {
381 self.inner.ready().await.map_err(|e| {
382 tonic::Status::new(
383 tonic::Code::Unknown,
384 format!("Service was not ready: {}", e.into()),
385 )
386 })?;
387 let codec = tonic::codec::ProstCodec::default();
388 let path = http::uri::PathAndQuery::from_static(
389 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor",
390 );
391 self.inner.unary(request.into_request(), path, codec).await
392 }
393 pub async fn get_query_services_descriptor(
395 &mut self,
396 request: impl tonic::IntoRequest<super::GetQueryServicesDescriptorRequest>,
397 ) -> Result<tonic::Response<super::GetQueryServicesDescriptorResponse>, tonic::Status>
398 {
399 self.inner.ready().await.map_err(|e| {
400 tonic::Status::new(
401 tonic::Code::Unknown,
402 format!("Service was not ready: {}", e.into()),
403 )
404 })?;
405 let codec = tonic::codec::ProstCodec::default();
406 let path = http::uri::PathAndQuery::from_static(
407 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor",
408 );
409 self.inner.unary(request.into_request(), path, codec).await
410 }
411 pub async fn get_tx_descriptor(
413 &mut self,
414 request: impl tonic::IntoRequest<super::GetTxDescriptorRequest>,
415 ) -> Result<tonic::Response<super::GetTxDescriptorResponse>, tonic::Status> {
416 self.inner.ready().await.map_err(|e| {
417 tonic::Status::new(
418 tonic::Code::Unknown,
419 format!("Service was not ready: {}", e.into()),
420 )
421 })?;
422 let codec = tonic::codec::ProstCodec::default();
423 let path = http::uri::PathAndQuery::from_static(
424 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor",
425 );
426 self.inner.unary(request.into_request(), path, codec).await
427 }
428 }
429}
430#[cfg(feature = "grpc")]
432#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
433pub mod reflection_service_server {
434 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
435 use tonic::codegen::*;
436 #[async_trait]
438 pub trait ReflectionService: Send + Sync + 'static {
439 async fn get_authn_descriptor(
443 &self,
444 request: tonic::Request<super::GetAuthnDescriptorRequest>,
445 ) -> Result<tonic::Response<super::GetAuthnDescriptorResponse>, tonic::Status>;
446 async fn get_chain_descriptor(
448 &self,
449 request: tonic::Request<super::GetChainDescriptorRequest>,
450 ) -> Result<tonic::Response<super::GetChainDescriptorResponse>, tonic::Status>;
451 async fn get_codec_descriptor(
453 &self,
454 request: tonic::Request<super::GetCodecDescriptorRequest>,
455 ) -> Result<tonic::Response<super::GetCodecDescriptorResponse>, tonic::Status>;
456 async fn get_configuration_descriptor(
458 &self,
459 request: tonic::Request<super::GetConfigurationDescriptorRequest>,
460 ) -> Result<tonic::Response<super::GetConfigurationDescriptorResponse>, tonic::Status>;
461 async fn get_query_services_descriptor(
463 &self,
464 request: tonic::Request<super::GetQueryServicesDescriptorRequest>,
465 ) -> Result<tonic::Response<super::GetQueryServicesDescriptorResponse>, tonic::Status>;
466 async fn get_tx_descriptor(
468 &self,
469 request: tonic::Request<super::GetTxDescriptorRequest>,
470 ) -> Result<tonic::Response<super::GetTxDescriptorResponse>, tonic::Status>;
471 }
472 #[derive(Debug)]
474 pub struct ReflectionServiceServer<T: ReflectionService> {
475 inner: _Inner<T>,
476 accept_compression_encodings: EnabledCompressionEncodings,
477 send_compression_encodings: EnabledCompressionEncodings,
478 }
479 struct _Inner<T>(Arc<T>);
480 impl<T: ReflectionService> ReflectionServiceServer<T> {
481 pub fn new(inner: T) -> Self {
482 Self::from_arc(Arc::new(inner))
483 }
484 pub fn from_arc(inner: Arc<T>) -> Self {
485 let inner = _Inner(inner);
486 Self {
487 inner,
488 accept_compression_encodings: Default::default(),
489 send_compression_encodings: Default::default(),
490 }
491 }
492 pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
493 where
494 F: tonic::service::Interceptor,
495 {
496 InterceptedService::new(Self::new(inner), interceptor)
497 }
498 #[must_use]
500 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
501 self.accept_compression_encodings.enable(encoding);
502 self
503 }
504 #[must_use]
506 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
507 self.send_compression_encodings.enable(encoding);
508 self
509 }
510 }
511 impl<T, B> tonic::codegen::Service<http::Request<B>> for ReflectionServiceServer<T>
512 where
513 T: ReflectionService,
514 B: Body + Send + 'static,
515 B::Error: Into<StdError> + Send + 'static,
516 {
517 type Response = http::Response<tonic::body::BoxBody>;
518 type Error = std::convert::Infallible;
519 type Future = BoxFuture<Self::Response, Self::Error>;
520 fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
521 Poll::Ready(Ok(()))
522 }
523 fn call(&mut self, req: http::Request<B>) -> Self::Future {
524 let inner = self.inner.clone();
525 match req.uri().path() {
526 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor" => {
527 #[allow(non_camel_case_types)]
528 struct GetAuthnDescriptorSvc<T: ReflectionService>(pub Arc<T>);
529 impl<T: ReflectionService>
530 tonic::server::UnaryService<super::GetAuthnDescriptorRequest>
531 for GetAuthnDescriptorSvc<T>
532 {
533 type Response = super::GetAuthnDescriptorResponse;
534 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
535 fn call(
536 &mut self,
537 request: tonic::Request<super::GetAuthnDescriptorRequest>,
538 ) -> Self::Future {
539 let inner = self.0.clone();
540 let fut = async move { (*inner).get_authn_descriptor(request).await };
541 Box::pin(fut)
542 }
543 }
544 let accept_compression_encodings = self.accept_compression_encodings;
545 let send_compression_encodings = self.send_compression_encodings;
546 let inner = self.inner.clone();
547 let fut = async move {
548 let inner = inner.0;
549 let method = GetAuthnDescriptorSvc(inner);
550 let codec = tonic::codec::ProstCodec::default();
551 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
552 accept_compression_encodings,
553 send_compression_encodings,
554 );
555 let res = grpc.unary(method, req).await;
556 Ok(res)
557 };
558 Box::pin(fut)
559 }
560 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor" => {
561 #[allow(non_camel_case_types)]
562 struct GetChainDescriptorSvc<T: ReflectionService>(pub Arc<T>);
563 impl<T: ReflectionService>
564 tonic::server::UnaryService<super::GetChainDescriptorRequest>
565 for GetChainDescriptorSvc<T>
566 {
567 type Response = super::GetChainDescriptorResponse;
568 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
569 fn call(
570 &mut self,
571 request: tonic::Request<super::GetChainDescriptorRequest>,
572 ) -> Self::Future {
573 let inner = self.0.clone();
574 let fut = async move { (*inner).get_chain_descriptor(request).await };
575 Box::pin(fut)
576 }
577 }
578 let accept_compression_encodings = self.accept_compression_encodings;
579 let send_compression_encodings = self.send_compression_encodings;
580 let inner = self.inner.clone();
581 let fut = async move {
582 let inner = inner.0;
583 let method = GetChainDescriptorSvc(inner);
584 let codec = tonic::codec::ProstCodec::default();
585 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
586 accept_compression_encodings,
587 send_compression_encodings,
588 );
589 let res = grpc.unary(method, req).await;
590 Ok(res)
591 };
592 Box::pin(fut)
593 }
594 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor" => {
595 #[allow(non_camel_case_types)]
596 struct GetCodecDescriptorSvc<T: ReflectionService>(pub Arc<T>);
597 impl<T: ReflectionService>
598 tonic::server::UnaryService<super::GetCodecDescriptorRequest>
599 for GetCodecDescriptorSvc<T>
600 {
601 type Response = super::GetCodecDescriptorResponse;
602 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
603 fn call(
604 &mut self,
605 request: tonic::Request<super::GetCodecDescriptorRequest>,
606 ) -> Self::Future {
607 let inner = self.0.clone();
608 let fut = async move { (*inner).get_codec_descriptor(request).await };
609 Box::pin(fut)
610 }
611 }
612 let accept_compression_encodings = self.accept_compression_encodings;
613 let send_compression_encodings = self.send_compression_encodings;
614 let inner = self.inner.clone();
615 let fut = async move {
616 let inner = inner.0;
617 let method = GetCodecDescriptorSvc(inner);
618 let codec = tonic::codec::ProstCodec::default();
619 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
620 accept_compression_encodings,
621 send_compression_encodings,
622 );
623 let res = grpc.unary(method, req).await;
624 Ok(res)
625 };
626 Box::pin(fut)
627 }
628 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor" => {
629 #[allow(non_camel_case_types)]
630 struct GetConfigurationDescriptorSvc<T: ReflectionService>(pub Arc<T>);
631 impl<T: ReflectionService>
632 tonic::server::UnaryService<super::GetConfigurationDescriptorRequest>
633 for GetConfigurationDescriptorSvc<T>
634 {
635 type Response = super::GetConfigurationDescriptorResponse;
636 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
637 fn call(
638 &mut self,
639 request: tonic::Request<super::GetConfigurationDescriptorRequest>,
640 ) -> Self::Future {
641 let inner = self.0.clone();
642 let fut =
643 async move { (*inner).get_configuration_descriptor(request).await };
644 Box::pin(fut)
645 }
646 }
647 let accept_compression_encodings = self.accept_compression_encodings;
648 let send_compression_encodings = self.send_compression_encodings;
649 let inner = self.inner.clone();
650 let fut = async move {
651 let inner = inner.0;
652 let method = GetConfigurationDescriptorSvc(inner);
653 let codec = tonic::codec::ProstCodec::default();
654 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
655 accept_compression_encodings,
656 send_compression_encodings,
657 );
658 let res = grpc.unary(method, req).await;
659 Ok(res)
660 };
661 Box::pin(fut)
662 }
663 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor" => {
664 #[allow(non_camel_case_types)]
665 struct GetQueryServicesDescriptorSvc<T: ReflectionService>(pub Arc<T>);
666 impl<T: ReflectionService>
667 tonic::server::UnaryService<super::GetQueryServicesDescriptorRequest>
668 for GetQueryServicesDescriptorSvc<T>
669 {
670 type Response = super::GetQueryServicesDescriptorResponse;
671 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
672 fn call(
673 &mut self,
674 request: tonic::Request<super::GetQueryServicesDescriptorRequest>,
675 ) -> Self::Future {
676 let inner = self.0.clone();
677 let fut = async move {
678 (*inner).get_query_services_descriptor(request).await
679 };
680 Box::pin(fut)
681 }
682 }
683 let accept_compression_encodings = self.accept_compression_encodings;
684 let send_compression_encodings = self.send_compression_encodings;
685 let inner = self.inner.clone();
686 let fut = async move {
687 let inner = inner.0;
688 let method = GetQueryServicesDescriptorSvc(inner);
689 let codec = tonic::codec::ProstCodec::default();
690 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
691 accept_compression_encodings,
692 send_compression_encodings,
693 );
694 let res = grpc.unary(method, req).await;
695 Ok(res)
696 };
697 Box::pin(fut)
698 }
699 "/cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor" => {
700 #[allow(non_camel_case_types)]
701 struct GetTxDescriptorSvc<T: ReflectionService>(pub Arc<T>);
702 impl<T: ReflectionService>
703 tonic::server::UnaryService<super::GetTxDescriptorRequest>
704 for GetTxDescriptorSvc<T>
705 {
706 type Response = super::GetTxDescriptorResponse;
707 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
708 fn call(
709 &mut self,
710 request: tonic::Request<super::GetTxDescriptorRequest>,
711 ) -> Self::Future {
712 let inner = self.0.clone();
713 let fut = async move { (*inner).get_tx_descriptor(request).await };
714 Box::pin(fut)
715 }
716 }
717 let accept_compression_encodings = self.accept_compression_encodings;
718 let send_compression_encodings = self.send_compression_encodings;
719 let inner = self.inner.clone();
720 let fut = async move {
721 let inner = inner.0;
722 let method = GetTxDescriptorSvc(inner);
723 let codec = tonic::codec::ProstCodec::default();
724 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
725 accept_compression_encodings,
726 send_compression_encodings,
727 );
728 let res = grpc.unary(method, req).await;
729 Ok(res)
730 };
731 Box::pin(fut)
732 }
733 _ => Box::pin(async move {
734 Ok(http::Response::builder()
735 .status(200)
736 .header("grpc-status", "12")
737 .header("content-type", "application/grpc")
738 .body(empty_body())
739 .unwrap())
740 }),
741 }
742 }
743 }
744 impl<T: ReflectionService> Clone for ReflectionServiceServer<T> {
745 fn clone(&self) -> Self {
746 let inner = self.inner.clone();
747 Self {
748 inner,
749 accept_compression_encodings: self.accept_compression_encodings,
750 send_compression_encodings: self.send_compression_encodings,
751 }
752 }
753 }
754 impl<T: ReflectionService> Clone for _Inner<T> {
755 fn clone(&self) -> Self {
756 Self(self.0.clone())
757 }
758 }
759 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
760 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
761 write!(f, "{:?}", self.0)
762 }
763 }
764 impl<T: ReflectionService> tonic::server::NamedService for ReflectionServiceServer<T> {
765 const NAME: &'static str = "cosmos.base.reflection.v2alpha1.ReflectionService";
766 }
767}