1#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct MsgGrantAllowance {
6 #[prost(string, tag = "1")]
8 pub granter: ::prost::alloc::string::String,
9 #[prost(string, tag = "2")]
11 pub grantee: ::prost::alloc::string::String,
12 #[prost(message, optional, tag = "3")]
14 pub allowance: ::core::option::Option<::prost_types::Any>,
15}
16#[allow(clippy::derive_partial_eq_without_eq)]
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct MsgGrantAllowanceResponse {}
20#[allow(clippy::derive_partial_eq_without_eq)]
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct MsgRevokeAllowance {
24 #[prost(string, tag = "1")]
26 pub granter: ::prost::alloc::string::String,
27 #[prost(string, tag = "2")]
29 pub grantee: ::prost::alloc::string::String,
30}
31#[allow(clippy::derive_partial_eq_without_eq)]
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct MsgRevokeAllowanceResponse {}
35#[cfg(feature = "grpc")]
37#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
38pub mod msg_client {
39 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
40 use tonic::codegen::http::Uri;
41 use tonic::codegen::*;
42 #[derive(Debug, Clone)]
44 pub struct MsgClient<T> {
45 inner: tonic::client::Grpc<T>,
46 }
47 #[cfg(feature = "grpc-transport")]
48 #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
49 impl MsgClient<tonic::transport::Channel> {
50 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
52 where
53 D: std::convert::TryInto<tonic::transport::Endpoint>,
54 D::Error: Into<StdError>,
55 {
56 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
57 Ok(Self::new(conn))
58 }
59 }
60 impl<T> MsgClient<T>
61 where
62 T: tonic::client::GrpcService<tonic::body::BoxBody>,
63 T::Error: Into<StdError>,
64 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
65 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
66 {
67 pub fn new(inner: T) -> Self {
68 let inner = tonic::client::Grpc::new(inner);
69 Self { inner }
70 }
71 pub fn with_origin(inner: T, origin: Uri) -> Self {
72 let inner = tonic::client::Grpc::with_origin(inner, origin);
73 Self { inner }
74 }
75 pub fn with_interceptor<F>(inner: T, interceptor: F) -> MsgClient<InterceptedService<T, F>>
76 where
77 F: tonic::service::Interceptor,
78 T::ResponseBody: Default,
79 T: tonic::codegen::Service<
80 http::Request<tonic::body::BoxBody>,
81 Response = http::Response<
82 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
83 >,
84 >,
85 <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
86 Into<StdError> + Send + Sync,
87 {
88 MsgClient::new(InterceptedService::new(inner, interceptor))
89 }
90 #[must_use]
95 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
96 self.inner = self.inner.send_compressed(encoding);
97 self
98 }
99 #[must_use]
101 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
102 self.inner = self.inner.accept_compressed(encoding);
103 self
104 }
105 pub async fn grant_allowance(
108 &mut self,
109 request: impl tonic::IntoRequest<super::MsgGrantAllowance>,
110 ) -> Result<tonic::Response<super::MsgGrantAllowanceResponse>, tonic::Status> {
111 self.inner.ready().await.map_err(|e| {
112 tonic::Status::new(
113 tonic::Code::Unknown,
114 format!("Service was not ready: {}", e.into()),
115 )
116 })?;
117 let codec = tonic::codec::ProstCodec::default();
118 let path =
119 http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Msg/GrantAllowance");
120 self.inner.unary(request.into_request(), path, codec).await
121 }
122 pub async fn revoke_allowance(
125 &mut self,
126 request: impl tonic::IntoRequest<super::MsgRevokeAllowance>,
127 ) -> Result<tonic::Response<super::MsgRevokeAllowanceResponse>, tonic::Status> {
128 self.inner.ready().await.map_err(|e| {
129 tonic::Status::new(
130 tonic::Code::Unknown,
131 format!("Service was not ready: {}", e.into()),
132 )
133 })?;
134 let codec = tonic::codec::ProstCodec::default();
135 let path = http::uri::PathAndQuery::from_static(
136 "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance",
137 );
138 self.inner.unary(request.into_request(), path, codec).await
139 }
140 }
141}
142#[cfg(feature = "grpc")]
144#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
145pub mod msg_server {
146 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
147 use tonic::codegen::*;
148 #[async_trait]
150 pub trait Msg: Send + Sync + 'static {
151 async fn grant_allowance(
154 &self,
155 request: tonic::Request<super::MsgGrantAllowance>,
156 ) -> Result<tonic::Response<super::MsgGrantAllowanceResponse>, tonic::Status>;
157 async fn revoke_allowance(
160 &self,
161 request: tonic::Request<super::MsgRevokeAllowance>,
162 ) -> Result<tonic::Response<super::MsgRevokeAllowanceResponse>, tonic::Status>;
163 }
164 #[derive(Debug)]
166 pub struct MsgServer<T: Msg> {
167 inner: _Inner<T>,
168 accept_compression_encodings: EnabledCompressionEncodings,
169 send_compression_encodings: EnabledCompressionEncodings,
170 }
171 struct _Inner<T>(Arc<T>);
172 impl<T: Msg> MsgServer<T> {
173 pub fn new(inner: T) -> Self {
174 Self::from_arc(Arc::new(inner))
175 }
176 pub fn from_arc(inner: Arc<T>) -> Self {
177 let inner = _Inner(inner);
178 Self {
179 inner,
180 accept_compression_encodings: Default::default(),
181 send_compression_encodings: Default::default(),
182 }
183 }
184 pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
185 where
186 F: tonic::service::Interceptor,
187 {
188 InterceptedService::new(Self::new(inner), interceptor)
189 }
190 #[must_use]
192 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
193 self.accept_compression_encodings.enable(encoding);
194 self
195 }
196 #[must_use]
198 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
199 self.send_compression_encodings.enable(encoding);
200 self
201 }
202 }
203 impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
204 where
205 T: Msg,
206 B: Body + Send + 'static,
207 B::Error: Into<StdError> + Send + 'static,
208 {
209 type Response = http::Response<tonic::body::BoxBody>;
210 type Error = std::convert::Infallible;
211 type Future = BoxFuture<Self::Response, Self::Error>;
212 fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
213 Poll::Ready(Ok(()))
214 }
215 fn call(&mut self, req: http::Request<B>) -> Self::Future {
216 let inner = self.inner.clone();
217 match req.uri().path() {
218 "/cosmos.feegrant.v1beta1.Msg/GrantAllowance" => {
219 #[allow(non_camel_case_types)]
220 struct GrantAllowanceSvc<T: Msg>(pub Arc<T>);
221 impl<T: Msg> tonic::server::UnaryService<super::MsgGrantAllowance> for GrantAllowanceSvc<T> {
222 type Response = super::MsgGrantAllowanceResponse;
223 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
224 fn call(
225 &mut self,
226 request: tonic::Request<super::MsgGrantAllowance>,
227 ) -> Self::Future {
228 let inner = self.0.clone();
229 let fut = async move { (*inner).grant_allowance(request).await };
230 Box::pin(fut)
231 }
232 }
233 let accept_compression_encodings = self.accept_compression_encodings;
234 let send_compression_encodings = self.send_compression_encodings;
235 let inner = self.inner.clone();
236 let fut = async move {
237 let inner = inner.0;
238 let method = GrantAllowanceSvc(inner);
239 let codec = tonic::codec::ProstCodec::default();
240 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
241 accept_compression_encodings,
242 send_compression_encodings,
243 );
244 let res = grpc.unary(method, req).await;
245 Ok(res)
246 };
247 Box::pin(fut)
248 }
249 "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance" => {
250 #[allow(non_camel_case_types)]
251 struct RevokeAllowanceSvc<T: Msg>(pub Arc<T>);
252 impl<T: Msg> tonic::server::UnaryService<super::MsgRevokeAllowance> for RevokeAllowanceSvc<T> {
253 type Response = super::MsgRevokeAllowanceResponse;
254 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
255 fn call(
256 &mut self,
257 request: tonic::Request<super::MsgRevokeAllowance>,
258 ) -> Self::Future {
259 let inner = self.0.clone();
260 let fut = async move { (*inner).revoke_allowance(request).await };
261 Box::pin(fut)
262 }
263 }
264 let accept_compression_encodings = self.accept_compression_encodings;
265 let send_compression_encodings = self.send_compression_encodings;
266 let inner = self.inner.clone();
267 let fut = async move {
268 let inner = inner.0;
269 let method = RevokeAllowanceSvc(inner);
270 let codec = tonic::codec::ProstCodec::default();
271 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
272 accept_compression_encodings,
273 send_compression_encodings,
274 );
275 let res = grpc.unary(method, req).await;
276 Ok(res)
277 };
278 Box::pin(fut)
279 }
280 _ => Box::pin(async move {
281 Ok(http::Response::builder()
282 .status(200)
283 .header("grpc-status", "12")
284 .header("content-type", "application/grpc")
285 .body(empty_body())
286 .unwrap())
287 }),
288 }
289 }
290 }
291 impl<T: Msg> Clone for MsgServer<T> {
292 fn clone(&self) -> Self {
293 let inner = self.inner.clone();
294 Self {
295 inner,
296 accept_compression_encodings: self.accept_compression_encodings,
297 send_compression_encodings: self.send_compression_encodings,
298 }
299 }
300 }
301 impl<T: Msg> Clone for _Inner<T> {
302 fn clone(&self) -> Self {
303 Self(self.0.clone())
304 }
305 }
306 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
307 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
308 write!(f, "{:?}", self.0)
309 }
310 }
311 impl<T: Msg> tonic::server::NamedService for MsgServer<T> {
312 const NAME: &'static str = "cosmos.feegrant.v1beta1.Msg";
313 }
314}
315#[allow(clippy::derive_partial_eq_without_eq)]
318#[derive(Clone, PartialEq, ::prost::Message)]
319pub struct BasicAllowance {
320 #[prost(message, repeated, tag = "1")]
324 pub spend_limit: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
325 #[prost(message, optional, tag = "2")]
327 pub expiration: ::core::option::Option<::prost_types::Timestamp>,
328}
329#[allow(clippy::derive_partial_eq_without_eq)]
332#[derive(Clone, PartialEq, ::prost::Message)]
333pub struct PeriodicAllowance {
334 #[prost(message, optional, tag = "1")]
336 pub basic: ::core::option::Option<BasicAllowance>,
337 #[prost(message, optional, tag = "2")]
340 pub period: ::core::option::Option<::prost_types::Duration>,
341 #[prost(message, repeated, tag = "3")]
344 pub period_spend_limit: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
345 #[prost(message, repeated, tag = "4")]
347 pub period_can_spend: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
348 #[prost(message, optional, tag = "5")]
352 pub period_reset: ::core::option::Option<::prost_types::Timestamp>,
353}
354#[allow(clippy::derive_partial_eq_without_eq)]
356#[derive(Clone, PartialEq, ::prost::Message)]
357pub struct AllowedMsgAllowance {
358 #[prost(message, optional, tag = "1")]
360 pub allowance: ::core::option::Option<::prost_types::Any>,
361 #[prost(string, repeated, tag = "2")]
363 pub allowed_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
364}
365#[allow(clippy::derive_partial_eq_without_eq)]
367#[derive(Clone, PartialEq, ::prost::Message)]
368pub struct Grant {
369 #[prost(string, tag = "1")]
371 pub granter: ::prost::alloc::string::String,
372 #[prost(string, tag = "2")]
374 pub grantee: ::prost::alloc::string::String,
375 #[prost(message, optional, tag = "3")]
377 pub allowance: ::core::option::Option<::prost_types::Any>,
378}
379#[allow(clippy::derive_partial_eq_without_eq)]
381#[derive(Clone, PartialEq, ::prost::Message)]
382pub struct QueryAllowanceRequest {
383 #[prost(string, tag = "1")]
385 pub granter: ::prost::alloc::string::String,
386 #[prost(string, tag = "2")]
388 pub grantee: ::prost::alloc::string::String,
389}
390#[allow(clippy::derive_partial_eq_without_eq)]
392#[derive(Clone, PartialEq, ::prost::Message)]
393pub struct QueryAllowanceResponse {
394 #[prost(message, optional, tag = "1")]
396 pub allowance: ::core::option::Option<Grant>,
397}
398#[allow(clippy::derive_partial_eq_without_eq)]
400#[derive(Clone, PartialEq, ::prost::Message)]
401pub struct QueryAllowancesRequest {
402 #[prost(string, tag = "1")]
403 pub grantee: ::prost::alloc::string::String,
404 #[prost(message, optional, tag = "2")]
406 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
407}
408#[allow(clippy::derive_partial_eq_without_eq)]
410#[derive(Clone, PartialEq, ::prost::Message)]
411pub struct QueryAllowancesResponse {
412 #[prost(message, repeated, tag = "1")]
414 pub allowances: ::prost::alloc::vec::Vec<Grant>,
415 #[prost(message, optional, tag = "2")]
417 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
418}
419#[cfg(feature = "grpc")]
421#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
422pub mod query_client {
423 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
424 use tonic::codegen::http::Uri;
425 use tonic::codegen::*;
426 #[derive(Debug, Clone)]
428 pub struct QueryClient<T> {
429 inner: tonic::client::Grpc<T>,
430 }
431 #[cfg(feature = "grpc-transport")]
432 #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
433 impl QueryClient<tonic::transport::Channel> {
434 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
436 where
437 D: std::convert::TryInto<tonic::transport::Endpoint>,
438 D::Error: Into<StdError>,
439 {
440 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
441 Ok(Self::new(conn))
442 }
443 }
444 impl<T> QueryClient<T>
445 where
446 T: tonic::client::GrpcService<tonic::body::BoxBody>,
447 T::Error: Into<StdError>,
448 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
449 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
450 {
451 pub fn new(inner: T) -> Self {
452 let inner = tonic::client::Grpc::new(inner);
453 Self { inner }
454 }
455 pub fn with_origin(inner: T, origin: Uri) -> Self {
456 let inner = tonic::client::Grpc::with_origin(inner, origin);
457 Self { inner }
458 }
459 pub fn with_interceptor<F>(
460 inner: T,
461 interceptor: F,
462 ) -> QueryClient<InterceptedService<T, F>>
463 where
464 F: tonic::service::Interceptor,
465 T::ResponseBody: Default,
466 T: tonic::codegen::Service<
467 http::Request<tonic::body::BoxBody>,
468 Response = http::Response<
469 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
470 >,
471 >,
472 <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
473 Into<StdError> + Send + Sync,
474 {
475 QueryClient::new(InterceptedService::new(inner, interceptor))
476 }
477 #[must_use]
482 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
483 self.inner = self.inner.send_compressed(encoding);
484 self
485 }
486 #[must_use]
488 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
489 self.inner = self.inner.accept_compressed(encoding);
490 self
491 }
492 pub async fn allowance(
494 &mut self,
495 request: impl tonic::IntoRequest<super::QueryAllowanceRequest>,
496 ) -> Result<tonic::Response<super::QueryAllowanceResponse>, tonic::Status> {
497 self.inner.ready().await.map_err(|e| {
498 tonic::Status::new(
499 tonic::Code::Unknown,
500 format!("Service was not ready: {}", e.into()),
501 )
502 })?;
503 let codec = tonic::codec::ProstCodec::default();
504 let path =
505 http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Query/Allowance");
506 self.inner.unary(request.into_request(), path, codec).await
507 }
508 pub async fn allowances(
510 &mut self,
511 request: impl tonic::IntoRequest<super::QueryAllowancesRequest>,
512 ) -> Result<tonic::Response<super::QueryAllowancesResponse>, tonic::Status> {
513 self.inner.ready().await.map_err(|e| {
514 tonic::Status::new(
515 tonic::Code::Unknown,
516 format!("Service was not ready: {}", e.into()),
517 )
518 })?;
519 let codec = tonic::codec::ProstCodec::default();
520 let path =
521 http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Query/Allowances");
522 self.inner.unary(request.into_request(), path, codec).await
523 }
524 }
525}
526#[cfg(feature = "grpc")]
528#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
529pub mod query_server {
530 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
531 use tonic::codegen::*;
532 #[async_trait]
534 pub trait Query: Send + Sync + 'static {
535 async fn allowance(
537 &self,
538 request: tonic::Request<super::QueryAllowanceRequest>,
539 ) -> Result<tonic::Response<super::QueryAllowanceResponse>, tonic::Status>;
540 async fn allowances(
542 &self,
543 request: tonic::Request<super::QueryAllowancesRequest>,
544 ) -> Result<tonic::Response<super::QueryAllowancesResponse>, tonic::Status>;
545 }
546 #[derive(Debug)]
548 pub struct QueryServer<T: Query> {
549 inner: _Inner<T>,
550 accept_compression_encodings: EnabledCompressionEncodings,
551 send_compression_encodings: EnabledCompressionEncodings,
552 }
553 struct _Inner<T>(Arc<T>);
554 impl<T: Query> QueryServer<T> {
555 pub fn new(inner: T) -> Self {
556 Self::from_arc(Arc::new(inner))
557 }
558 pub fn from_arc(inner: Arc<T>) -> Self {
559 let inner = _Inner(inner);
560 Self {
561 inner,
562 accept_compression_encodings: Default::default(),
563 send_compression_encodings: Default::default(),
564 }
565 }
566 pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
567 where
568 F: tonic::service::Interceptor,
569 {
570 InterceptedService::new(Self::new(inner), interceptor)
571 }
572 #[must_use]
574 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
575 self.accept_compression_encodings.enable(encoding);
576 self
577 }
578 #[must_use]
580 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
581 self.send_compression_encodings.enable(encoding);
582 self
583 }
584 }
585 impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
586 where
587 T: Query,
588 B: Body + Send + 'static,
589 B::Error: Into<StdError> + Send + 'static,
590 {
591 type Response = http::Response<tonic::body::BoxBody>;
592 type Error = std::convert::Infallible;
593 type Future = BoxFuture<Self::Response, Self::Error>;
594 fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
595 Poll::Ready(Ok(()))
596 }
597 fn call(&mut self, req: http::Request<B>) -> Self::Future {
598 let inner = self.inner.clone();
599 match req.uri().path() {
600 "/cosmos.feegrant.v1beta1.Query/Allowance" => {
601 #[allow(non_camel_case_types)]
602 struct AllowanceSvc<T: Query>(pub Arc<T>);
603 impl<T: Query> tonic::server::UnaryService<super::QueryAllowanceRequest> for AllowanceSvc<T> {
604 type Response = super::QueryAllowanceResponse;
605 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
606 fn call(
607 &mut self,
608 request: tonic::Request<super::QueryAllowanceRequest>,
609 ) -> Self::Future {
610 let inner = self.0.clone();
611 let fut = async move { (*inner).allowance(request).await };
612 Box::pin(fut)
613 }
614 }
615 let accept_compression_encodings = self.accept_compression_encodings;
616 let send_compression_encodings = self.send_compression_encodings;
617 let inner = self.inner.clone();
618 let fut = async move {
619 let inner = inner.0;
620 let method = AllowanceSvc(inner);
621 let codec = tonic::codec::ProstCodec::default();
622 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
623 accept_compression_encodings,
624 send_compression_encodings,
625 );
626 let res = grpc.unary(method, req).await;
627 Ok(res)
628 };
629 Box::pin(fut)
630 }
631 "/cosmos.feegrant.v1beta1.Query/Allowances" => {
632 #[allow(non_camel_case_types)]
633 struct AllowancesSvc<T: Query>(pub Arc<T>);
634 impl<T: Query> tonic::server::UnaryService<super::QueryAllowancesRequest> for AllowancesSvc<T> {
635 type Response = super::QueryAllowancesResponse;
636 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
637 fn call(
638 &mut self,
639 request: tonic::Request<super::QueryAllowancesRequest>,
640 ) -> Self::Future {
641 let inner = self.0.clone();
642 let fut = async move { (*inner).allowances(request).await };
643 Box::pin(fut)
644 }
645 }
646 let accept_compression_encodings = self.accept_compression_encodings;
647 let send_compression_encodings = self.send_compression_encodings;
648 let inner = self.inner.clone();
649 let fut = async move {
650 let inner = inner.0;
651 let method = AllowancesSvc(inner);
652 let codec = tonic::codec::ProstCodec::default();
653 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
654 accept_compression_encodings,
655 send_compression_encodings,
656 );
657 let res = grpc.unary(method, req).await;
658 Ok(res)
659 };
660 Box::pin(fut)
661 }
662 _ => Box::pin(async move {
663 Ok(http::Response::builder()
664 .status(200)
665 .header("grpc-status", "12")
666 .header("content-type", "application/grpc")
667 .body(empty_body())
668 .unwrap())
669 }),
670 }
671 }
672 }
673 impl<T: Query> Clone for QueryServer<T> {
674 fn clone(&self) -> Self {
675 let inner = self.inner.clone();
676 Self {
677 inner,
678 accept_compression_encodings: self.accept_compression_encodings,
679 send_compression_encodings: self.send_compression_encodings,
680 }
681 }
682 }
683 impl<T: Query> Clone for _Inner<T> {
684 fn clone(&self) -> Self {
685 Self(self.0.clone())
686 }
687 }
688 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
689 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
690 write!(f, "{:?}", self.0)
691 }
692 }
693 impl<T: Query> tonic::server::NamedService for QueryServer<T> {
694 const NAME: &'static str = "cosmos.feegrant.v1beta1.Query";
695 }
696}
697#[allow(clippy::derive_partial_eq_without_eq)]
699#[derive(Clone, PartialEq, ::prost::Message)]
700pub struct GenesisState {
701 #[prost(message, repeated, tag = "1")]
702 pub allowances: ::prost::alloc::vec::Vec<Grant>,
703}