juno_rust_proto/prost/ibc-go/
ibc.applications.interchain_accounts.controller.v1.rs1#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Params {
6 #[prost(bool, tag = "1")]
8 pub controller_enabled: bool,
9}
10#[allow(clippy::derive_partial_eq_without_eq)]
12#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct QueryParamsRequest {}
14#[allow(clippy::derive_partial_eq_without_eq)]
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct QueryParamsResponse {
18 #[prost(message, optional, tag = "1")]
20 pub params: ::core::option::Option<Params>,
21}
22#[cfg(feature = "grpc")]
24#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
25pub mod query_client {
26 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
27 use tonic::codegen::http::Uri;
28 use tonic::codegen::*;
29 #[derive(Debug, Clone)]
31 pub struct QueryClient<T> {
32 inner: tonic::client::Grpc<T>,
33 }
34 #[cfg(feature = "grpc-transport")]
35 #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
36 impl QueryClient<tonic::transport::Channel> {
37 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
39 where
40 D: std::convert::TryInto<tonic::transport::Endpoint>,
41 D::Error: Into<StdError>,
42 {
43 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
44 Ok(Self::new(conn))
45 }
46 }
47 impl<T> QueryClient<T>
48 where
49 T: tonic::client::GrpcService<tonic::body::BoxBody>,
50 T::Error: Into<StdError>,
51 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
52 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
53 {
54 pub fn new(inner: T) -> Self {
55 let inner = tonic::client::Grpc::new(inner);
56 Self { inner }
57 }
58 pub fn with_origin(inner: T, origin: Uri) -> Self {
59 let inner = tonic::client::Grpc::with_origin(inner, origin);
60 Self { inner }
61 }
62 pub fn with_interceptor<F>(
63 inner: T,
64 interceptor: F,
65 ) -> QueryClient<InterceptedService<T, F>>
66 where
67 F: tonic::service::Interceptor,
68 T::ResponseBody: Default,
69 T: tonic::codegen::Service<
70 http::Request<tonic::body::BoxBody>,
71 Response = http::Response<
72 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
73 >,
74 >,
75 <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
76 Into<StdError> + Send + Sync,
77 {
78 QueryClient::new(InterceptedService::new(inner, interceptor))
79 }
80 #[must_use]
85 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
86 self.inner = self.inner.send_compressed(encoding);
87 self
88 }
89 #[must_use]
91 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
92 self.inner = self.inner.accept_compressed(encoding);
93 self
94 }
95 pub async fn params(
97 &mut self,
98 request: impl tonic::IntoRequest<super::QueryParamsRequest>,
99 ) -> Result<tonic::Response<super::QueryParamsResponse>, tonic::Status> {
100 self.inner.ready().await.map_err(|e| {
101 tonic::Status::new(
102 tonic::Code::Unknown,
103 format!("Service was not ready: {}", e.into()),
104 )
105 })?;
106 let codec = tonic::codec::ProstCodec::default();
107 let path = http::uri::PathAndQuery::from_static(
108 "/ibc.applications.interchain_accounts.controller.v1.Query/Params",
109 );
110 self.inner.unary(request.into_request(), path, codec).await
111 }
112 }
113}