1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct GetValidatorSetByHeightRequest {
5 #[prost(int64, tag = "1")]
6 pub height: i64,
7 #[prost(message, optional, tag = "2")]
9 pub pagination: ::core::option::Option<super::super::query::v1beta1::PageRequest>,
10}
11#[allow(clippy::derive_partial_eq_without_eq)]
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct GetValidatorSetByHeightResponse {
15 #[prost(int64, tag = "1")]
16 pub block_height: i64,
17 #[prost(message, repeated, tag = "2")]
18 pub validators: ::prost::alloc::vec::Vec<Validator>,
19 #[prost(message, optional, tag = "3")]
21 pub pagination: ::core::option::Option<super::super::query::v1beta1::PageResponse>,
22}
23#[allow(clippy::derive_partial_eq_without_eq)]
25#[derive(Clone, PartialEq, ::prost::Message)]
26pub struct GetLatestValidatorSetRequest {
27 #[prost(message, optional, tag = "1")]
29 pub pagination: ::core::option::Option<super::super::query::v1beta1::PageRequest>,
30}
31#[allow(clippy::derive_partial_eq_without_eq)]
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct GetLatestValidatorSetResponse {
35 #[prost(int64, tag = "1")]
36 pub block_height: i64,
37 #[prost(message, repeated, tag = "2")]
38 pub validators: ::prost::alloc::vec::Vec<Validator>,
39 #[prost(message, optional, tag = "3")]
41 pub pagination: ::core::option::Option<super::super::query::v1beta1::PageResponse>,
42}
43#[allow(clippy::derive_partial_eq_without_eq)]
45#[derive(Clone, PartialEq, ::prost::Message)]
46pub struct Validator {
47 #[prost(string, tag = "1")]
48 pub address: ::prost::alloc::string::String,
49 #[prost(message, optional, tag = "2")]
50 pub pub_key: ::core::option::Option<::prost_types::Any>,
51 #[prost(int64, tag = "3")]
52 pub voting_power: i64,
53 #[prost(int64, tag = "4")]
54 pub proposer_priority: i64,
55}
56#[allow(clippy::derive_partial_eq_without_eq)]
58#[derive(Clone, PartialEq, ::prost::Message)]
59pub struct GetBlockByHeightRequest {
60 #[prost(int64, tag = "1")]
61 pub height: i64,
62}
63#[allow(clippy::derive_partial_eq_without_eq)]
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct GetBlockByHeightResponse {
67 #[prost(message, optional, tag = "1")]
68 pub block_id: ::core::option::Option<::tendermint_proto::types::BlockId>,
69 #[prost(message, optional, tag = "2")]
70 pub block: ::core::option::Option<::tendermint_proto::types::Block>,
71}
72#[allow(clippy::derive_partial_eq_without_eq)]
74#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct GetLatestBlockRequest {}
76#[allow(clippy::derive_partial_eq_without_eq)]
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct GetLatestBlockResponse {
80 #[prost(message, optional, tag = "1")]
81 pub block_id: ::core::option::Option<::tendermint_proto::types::BlockId>,
82 #[prost(message, optional, tag = "2")]
83 pub block: ::core::option::Option<::tendermint_proto::types::Block>,
84}
85#[allow(clippy::derive_partial_eq_without_eq)]
87#[derive(Clone, PartialEq, ::prost::Message)]
88pub struct GetSyncingRequest {}
89#[allow(clippy::derive_partial_eq_without_eq)]
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct GetSyncingResponse {
93 #[prost(bool, tag = "1")]
94 pub syncing: bool,
95}
96#[allow(clippy::derive_partial_eq_without_eq)]
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct GetNodeInfoRequest {}
100#[allow(clippy::derive_partial_eq_without_eq)]
102#[derive(Clone, PartialEq, ::prost::Message)]
103pub struct GetNodeInfoResponse {
104 #[prost(message, optional, tag = "1")]
105 pub default_node_info: ::core::option::Option<::tendermint_proto::p2p::DefaultNodeInfo>,
106 #[prost(message, optional, tag = "2")]
107 pub application_version: ::core::option::Option<VersionInfo>,
108}
109#[allow(clippy::derive_partial_eq_without_eq)]
111#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct VersionInfo {
113 #[prost(string, tag = "1")]
114 pub name: ::prost::alloc::string::String,
115 #[prost(string, tag = "2")]
116 pub app_name: ::prost::alloc::string::String,
117 #[prost(string, tag = "3")]
118 pub version: ::prost::alloc::string::String,
119 #[prost(string, tag = "4")]
120 pub git_commit: ::prost::alloc::string::String,
121 #[prost(string, tag = "5")]
122 pub build_tags: ::prost::alloc::string::String,
123 #[prost(string, tag = "6")]
124 pub go_version: ::prost::alloc::string::String,
125 #[prost(message, repeated, tag = "7")]
126 pub build_deps: ::prost::alloc::vec::Vec<Module>,
127 #[prost(string, tag = "8")]
129 pub cosmos_sdk_version: ::prost::alloc::string::String,
130}
131#[allow(clippy::derive_partial_eq_without_eq)]
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct Module {
135 #[prost(string, tag = "1")]
137 pub path: ::prost::alloc::string::String,
138 #[prost(string, tag = "2")]
140 pub version: ::prost::alloc::string::String,
141 #[prost(string, tag = "3")]
143 pub sum: ::prost::alloc::string::String,
144}
145#[cfg(feature = "grpc")]
147#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
148pub mod service_client {
149 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
150 use tonic::codegen::http::Uri;
151 use tonic::codegen::*;
152 #[derive(Debug, Clone)]
154 pub struct ServiceClient<T> {
155 inner: tonic::client::Grpc<T>,
156 }
157 #[cfg(feature = "grpc-transport")]
158 #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
159 impl ServiceClient<tonic::transport::Channel> {
160 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
162 where
163 D: std::convert::TryInto<tonic::transport::Endpoint>,
164 D::Error: Into<StdError>,
165 {
166 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
167 Ok(Self::new(conn))
168 }
169 }
170 impl<T> ServiceClient<T>
171 where
172 T: tonic::client::GrpcService<tonic::body::BoxBody>,
173 T::Error: Into<StdError>,
174 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
175 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
176 {
177 pub fn new(inner: T) -> Self {
178 let inner = tonic::client::Grpc::new(inner);
179 Self { inner }
180 }
181 pub fn with_origin(inner: T, origin: Uri) -> Self {
182 let inner = tonic::client::Grpc::with_origin(inner, origin);
183 Self { inner }
184 }
185 pub fn with_interceptor<F>(
186 inner: T,
187 interceptor: F,
188 ) -> ServiceClient<InterceptedService<T, F>>
189 where
190 F: tonic::service::Interceptor,
191 T::ResponseBody: Default,
192 T: tonic::codegen::Service<
193 http::Request<tonic::body::BoxBody>,
194 Response = http::Response<
195 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
196 >,
197 >,
198 <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
199 Into<StdError> + Send + Sync,
200 {
201 ServiceClient::new(InterceptedService::new(inner, interceptor))
202 }
203 #[must_use]
208 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
209 self.inner = self.inner.send_compressed(encoding);
210 self
211 }
212 #[must_use]
214 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
215 self.inner = self.inner.accept_compressed(encoding);
216 self
217 }
218 pub async fn get_node_info(
220 &mut self,
221 request: impl tonic::IntoRequest<super::GetNodeInfoRequest>,
222 ) -> Result<tonic::Response<super::GetNodeInfoResponse>, tonic::Status> {
223 self.inner.ready().await.map_err(|e| {
224 tonic::Status::new(
225 tonic::Code::Unknown,
226 format!("Service was not ready: {}", e.into()),
227 )
228 })?;
229 let codec = tonic::codec::ProstCodec::default();
230 let path = http::uri::PathAndQuery::from_static(
231 "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo",
232 );
233 self.inner.unary(request.into_request(), path, codec).await
234 }
235 pub async fn get_syncing(
237 &mut self,
238 request: impl tonic::IntoRequest<super::GetSyncingRequest>,
239 ) -> Result<tonic::Response<super::GetSyncingResponse>, tonic::Status> {
240 self.inner.ready().await.map_err(|e| {
241 tonic::Status::new(
242 tonic::Code::Unknown,
243 format!("Service was not ready: {}", e.into()),
244 )
245 })?;
246 let codec = tonic::codec::ProstCodec::default();
247 let path = http::uri::PathAndQuery::from_static(
248 "/cosmos.base.tendermint.v1beta1.Service/GetSyncing",
249 );
250 self.inner.unary(request.into_request(), path, codec).await
251 }
252 pub async fn get_latest_block(
254 &mut self,
255 request: impl tonic::IntoRequest<super::GetLatestBlockRequest>,
256 ) -> Result<tonic::Response<super::GetLatestBlockResponse>, tonic::Status> {
257 self.inner.ready().await.map_err(|e| {
258 tonic::Status::new(
259 tonic::Code::Unknown,
260 format!("Service was not ready: {}", e.into()),
261 )
262 })?;
263 let codec = tonic::codec::ProstCodec::default();
264 let path = http::uri::PathAndQuery::from_static(
265 "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock",
266 );
267 self.inner.unary(request.into_request(), path, codec).await
268 }
269 pub async fn get_block_by_height(
271 &mut self,
272 request: impl tonic::IntoRequest<super::GetBlockByHeightRequest>,
273 ) -> Result<tonic::Response<super::GetBlockByHeightResponse>, tonic::Status> {
274 self.inner.ready().await.map_err(|e| {
275 tonic::Status::new(
276 tonic::Code::Unknown,
277 format!("Service was not ready: {}", e.into()),
278 )
279 })?;
280 let codec = tonic::codec::ProstCodec::default();
281 let path = http::uri::PathAndQuery::from_static(
282 "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight",
283 );
284 self.inner.unary(request.into_request(), path, codec).await
285 }
286 pub async fn get_latest_validator_set(
288 &mut self,
289 request: impl tonic::IntoRequest<super::GetLatestValidatorSetRequest>,
290 ) -> Result<tonic::Response<super::GetLatestValidatorSetResponse>, tonic::Status> {
291 self.inner.ready().await.map_err(|e| {
292 tonic::Status::new(
293 tonic::Code::Unknown,
294 format!("Service was not ready: {}", e.into()),
295 )
296 })?;
297 let codec = tonic::codec::ProstCodec::default();
298 let path = http::uri::PathAndQuery::from_static(
299 "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet",
300 );
301 self.inner.unary(request.into_request(), path, codec).await
302 }
303 pub async fn get_validator_set_by_height(
305 &mut self,
306 request: impl tonic::IntoRequest<super::GetValidatorSetByHeightRequest>,
307 ) -> Result<tonic::Response<super::GetValidatorSetByHeightResponse>, tonic::Status>
308 {
309 self.inner.ready().await.map_err(|e| {
310 tonic::Status::new(
311 tonic::Code::Unknown,
312 format!("Service was not ready: {}", e.into()),
313 )
314 })?;
315 let codec = tonic::codec::ProstCodec::default();
316 let path = http::uri::PathAndQuery::from_static(
317 "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight",
318 );
319 self.inner.unary(request.into_request(), path, codec).await
320 }
321 }
322}
323#[cfg(feature = "grpc")]
325#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
326pub mod service_server {
327 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
328 use tonic::codegen::*;
329 #[async_trait]
331 pub trait Service: Send + Sync + 'static {
332 async fn get_node_info(
334 &self,
335 request: tonic::Request<super::GetNodeInfoRequest>,
336 ) -> Result<tonic::Response<super::GetNodeInfoResponse>, tonic::Status>;
337 async fn get_syncing(
339 &self,
340 request: tonic::Request<super::GetSyncingRequest>,
341 ) -> Result<tonic::Response<super::GetSyncingResponse>, tonic::Status>;
342 async fn get_latest_block(
344 &self,
345 request: tonic::Request<super::GetLatestBlockRequest>,
346 ) -> Result<tonic::Response<super::GetLatestBlockResponse>, tonic::Status>;
347 async fn get_block_by_height(
349 &self,
350 request: tonic::Request<super::GetBlockByHeightRequest>,
351 ) -> Result<tonic::Response<super::GetBlockByHeightResponse>, tonic::Status>;
352 async fn get_latest_validator_set(
354 &self,
355 request: tonic::Request<super::GetLatestValidatorSetRequest>,
356 ) -> Result<tonic::Response<super::GetLatestValidatorSetResponse>, tonic::Status>;
357 async fn get_validator_set_by_height(
359 &self,
360 request: tonic::Request<super::GetValidatorSetByHeightRequest>,
361 ) -> Result<tonic::Response<super::GetValidatorSetByHeightResponse>, tonic::Status>;
362 }
363 #[derive(Debug)]
365 pub struct ServiceServer<T: Service> {
366 inner: _Inner<T>,
367 accept_compression_encodings: EnabledCompressionEncodings,
368 send_compression_encodings: EnabledCompressionEncodings,
369 }
370 struct _Inner<T>(Arc<T>);
371 impl<T: Service> ServiceServer<T> {
372 pub fn new(inner: T) -> Self {
373 Self::from_arc(Arc::new(inner))
374 }
375 pub fn from_arc(inner: Arc<T>) -> Self {
376 let inner = _Inner(inner);
377 Self {
378 inner,
379 accept_compression_encodings: Default::default(),
380 send_compression_encodings: Default::default(),
381 }
382 }
383 pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
384 where
385 F: tonic::service::Interceptor,
386 {
387 InterceptedService::new(Self::new(inner), interceptor)
388 }
389 #[must_use]
391 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
392 self.accept_compression_encodings.enable(encoding);
393 self
394 }
395 #[must_use]
397 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
398 self.send_compression_encodings.enable(encoding);
399 self
400 }
401 }
402 impl<T, B> tonic::codegen::Service<http::Request<B>> for ServiceServer<T>
403 where
404 T: Service,
405 B: Body + Send + 'static,
406 B::Error: Into<StdError> + Send + 'static,
407 {
408 type Response = http::Response<tonic::body::BoxBody>;
409 type Error = std::convert::Infallible;
410 type Future = BoxFuture<Self::Response, Self::Error>;
411 fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
412 Poll::Ready(Ok(()))
413 }
414 fn call(&mut self, req: http::Request<B>) -> Self::Future {
415 let inner = self.inner.clone();
416 match req.uri().path() {
417 "/cosmos.base.tendermint.v1beta1.Service/GetNodeInfo" => {
418 #[allow(non_camel_case_types)]
419 struct GetNodeInfoSvc<T: Service>(pub Arc<T>);
420 impl<T: Service> tonic::server::UnaryService<super::GetNodeInfoRequest> for GetNodeInfoSvc<T> {
421 type Response = super::GetNodeInfoResponse;
422 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
423 fn call(
424 &mut self,
425 request: tonic::Request<super::GetNodeInfoRequest>,
426 ) -> Self::Future {
427 let inner = self.0.clone();
428 let fut = async move { (*inner).get_node_info(request).await };
429 Box::pin(fut)
430 }
431 }
432 let accept_compression_encodings = self.accept_compression_encodings;
433 let send_compression_encodings = self.send_compression_encodings;
434 let inner = self.inner.clone();
435 let fut = async move {
436 let inner = inner.0;
437 let method = GetNodeInfoSvc(inner);
438 let codec = tonic::codec::ProstCodec::default();
439 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
440 accept_compression_encodings,
441 send_compression_encodings,
442 );
443 let res = grpc.unary(method, req).await;
444 Ok(res)
445 };
446 Box::pin(fut)
447 }
448 "/cosmos.base.tendermint.v1beta1.Service/GetSyncing" => {
449 #[allow(non_camel_case_types)]
450 struct GetSyncingSvc<T: Service>(pub Arc<T>);
451 impl<T: Service> tonic::server::UnaryService<super::GetSyncingRequest> for GetSyncingSvc<T> {
452 type Response = super::GetSyncingResponse;
453 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
454 fn call(
455 &mut self,
456 request: tonic::Request<super::GetSyncingRequest>,
457 ) -> Self::Future {
458 let inner = self.0.clone();
459 let fut = async move { (*inner).get_syncing(request).await };
460 Box::pin(fut)
461 }
462 }
463 let accept_compression_encodings = self.accept_compression_encodings;
464 let send_compression_encodings = self.send_compression_encodings;
465 let inner = self.inner.clone();
466 let fut = async move {
467 let inner = inner.0;
468 let method = GetSyncingSvc(inner);
469 let codec = tonic::codec::ProstCodec::default();
470 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
471 accept_compression_encodings,
472 send_compression_encodings,
473 );
474 let res = grpc.unary(method, req).await;
475 Ok(res)
476 };
477 Box::pin(fut)
478 }
479 "/cosmos.base.tendermint.v1beta1.Service/GetLatestBlock" => {
480 #[allow(non_camel_case_types)]
481 struct GetLatestBlockSvc<T: Service>(pub Arc<T>);
482 impl<T: Service> tonic::server::UnaryService<super::GetLatestBlockRequest>
483 for GetLatestBlockSvc<T>
484 {
485 type Response = super::GetLatestBlockResponse;
486 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
487 fn call(
488 &mut self,
489 request: tonic::Request<super::GetLatestBlockRequest>,
490 ) -> Self::Future {
491 let inner = self.0.clone();
492 let fut = async move { (*inner).get_latest_block(request).await };
493 Box::pin(fut)
494 }
495 }
496 let accept_compression_encodings = self.accept_compression_encodings;
497 let send_compression_encodings = self.send_compression_encodings;
498 let inner = self.inner.clone();
499 let fut = async move {
500 let inner = inner.0;
501 let method = GetLatestBlockSvc(inner);
502 let codec = tonic::codec::ProstCodec::default();
503 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
504 accept_compression_encodings,
505 send_compression_encodings,
506 );
507 let res = grpc.unary(method, req).await;
508 Ok(res)
509 };
510 Box::pin(fut)
511 }
512 "/cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight" => {
513 #[allow(non_camel_case_types)]
514 struct GetBlockByHeightSvc<T: Service>(pub Arc<T>);
515 impl<T: Service> tonic::server::UnaryService<super::GetBlockByHeightRequest>
516 for GetBlockByHeightSvc<T>
517 {
518 type Response = super::GetBlockByHeightResponse;
519 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
520 fn call(
521 &mut self,
522 request: tonic::Request<super::GetBlockByHeightRequest>,
523 ) -> Self::Future {
524 let inner = self.0.clone();
525 let fut = async move { (*inner).get_block_by_height(request).await };
526 Box::pin(fut)
527 }
528 }
529 let accept_compression_encodings = self.accept_compression_encodings;
530 let send_compression_encodings = self.send_compression_encodings;
531 let inner = self.inner.clone();
532 let fut = async move {
533 let inner = inner.0;
534 let method = GetBlockByHeightSvc(inner);
535 let codec = tonic::codec::ProstCodec::default();
536 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
537 accept_compression_encodings,
538 send_compression_encodings,
539 );
540 let res = grpc.unary(method, req).await;
541 Ok(res)
542 };
543 Box::pin(fut)
544 }
545 "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet" => {
546 #[allow(non_camel_case_types)]
547 struct GetLatestValidatorSetSvc<T: Service>(pub Arc<T>);
548 impl<T: Service>
549 tonic::server::UnaryService<super::GetLatestValidatorSetRequest>
550 for GetLatestValidatorSetSvc<T>
551 {
552 type Response = super::GetLatestValidatorSetResponse;
553 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
554 fn call(
555 &mut self,
556 request: tonic::Request<super::GetLatestValidatorSetRequest>,
557 ) -> Self::Future {
558 let inner = self.0.clone();
559 let fut =
560 async move { (*inner).get_latest_validator_set(request).await };
561 Box::pin(fut)
562 }
563 }
564 let accept_compression_encodings = self.accept_compression_encodings;
565 let send_compression_encodings = self.send_compression_encodings;
566 let inner = self.inner.clone();
567 let fut = async move {
568 let inner = inner.0;
569 let method = GetLatestValidatorSetSvc(inner);
570 let codec = tonic::codec::ProstCodec::default();
571 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
572 accept_compression_encodings,
573 send_compression_encodings,
574 );
575 let res = grpc.unary(method, req).await;
576 Ok(res)
577 };
578 Box::pin(fut)
579 }
580 "/cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight" => {
581 #[allow(non_camel_case_types)]
582 struct GetValidatorSetByHeightSvc<T: Service>(pub Arc<T>);
583 impl<T: Service>
584 tonic::server::UnaryService<super::GetValidatorSetByHeightRequest>
585 for GetValidatorSetByHeightSvc<T>
586 {
587 type Response = super::GetValidatorSetByHeightResponse;
588 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
589 fn call(
590 &mut self,
591 request: tonic::Request<super::GetValidatorSetByHeightRequest>,
592 ) -> Self::Future {
593 let inner = self.0.clone();
594 let fut =
595 async move { (*inner).get_validator_set_by_height(request).await };
596 Box::pin(fut)
597 }
598 }
599 let accept_compression_encodings = self.accept_compression_encodings;
600 let send_compression_encodings = self.send_compression_encodings;
601 let inner = self.inner.clone();
602 let fut = async move {
603 let inner = inner.0;
604 let method = GetValidatorSetByHeightSvc(inner);
605 let codec = tonic::codec::ProstCodec::default();
606 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
607 accept_compression_encodings,
608 send_compression_encodings,
609 );
610 let res = grpc.unary(method, req).await;
611 Ok(res)
612 };
613 Box::pin(fut)
614 }
615 _ => Box::pin(async move {
616 Ok(http::Response::builder()
617 .status(200)
618 .header("grpc-status", "12")
619 .header("content-type", "application/grpc")
620 .body(empty_body())
621 .unwrap())
622 }),
623 }
624 }
625 }
626 impl<T: Service> Clone for ServiceServer<T> {
627 fn clone(&self) -> Self {
628 let inner = self.inner.clone();
629 Self {
630 inner,
631 accept_compression_encodings: self.accept_compression_encodings,
632 send_compression_encodings: self.send_compression_encodings,
633 }
634 }
635 }
636 impl<T: Service> Clone for _Inner<T> {
637 fn clone(&self) -> Self {
638 Self(self.0.clone())
639 }
640 }
641 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
642 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
643 write!(f, "{:?}", self.0)
644 }
645 }
646 impl<T: Service> tonic::server::NamedService for ServiceServer<T> {
647 const NAME: &'static str = "cosmos.base.tendermint.v1beta1.Service";
648 }
649}