/// Generated client implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod abci_application_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; #[derive(Debug, Clone)] pub struct AbciApplicationClient { inner: tonic::client::Grpc, } #[cfg(feature = "grpc-transport")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] impl AbciApplicationClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: std::convert::TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl AbciApplicationClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_origin(inner: T, origin: Uri) -> Self { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } pub fn with_interceptor( inner: T, interceptor: F, ) -> AbciApplicationClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, >>::Error: Into + Send + Sync, { AbciApplicationClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } pub async fn echo( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestEcho>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/Echo"); self.inner.unary(request.into_request(), path, codec).await } pub async fn flush( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestFlush>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/Flush"); self.inner.unary(request.into_request(), path, codec).await } pub async fn info( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestInfo>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/Info"); self.inner.unary(request.into_request(), path, codec).await } pub async fn deliver_tx( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestDeliverTx>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/DeliverTx"); self.inner.unary(request.into_request(), path, codec).await } pub async fn check_tx( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestCheckTx>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/CheckTx"); self.inner.unary(request.into_request(), path, codec).await } pub async fn query( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestQuery>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/Query"); self.inner.unary(request.into_request(), path, codec).await } pub async fn commit( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestCommit>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/Commit"); self.inner.unary(request.into_request(), path, codec).await } pub async fn init_chain( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestInitChain>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/InitChain"); self.inner.unary(request.into_request(), path, codec).await } pub async fn begin_block( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestBeginBlock>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/BeginBlock"); self.inner.unary(request.into_request(), path, codec).await } pub async fn end_block( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestEndBlock>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/tendermint.abci.ABCIApplication/EndBlock"); self.inner.unary(request.into_request(), path, codec).await } pub async fn list_snapshots( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestListSnapshots>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tendermint.abci.ABCIApplication/ListSnapshots", ); self.inner.unary(request.into_request(), path, codec).await } pub async fn offer_snapshot( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestOfferSnapshot>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tendermint.abci.ABCIApplication/OfferSnapshot", ); self.inner.unary(request.into_request(), path, codec).await } pub async fn load_snapshot_chunk( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestLoadSnapshotChunk>, ) -> Result< tonic::Response<::tendermint_proto::abci::ResponseLoadSnapshotChunk>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tendermint.abci.ABCIApplication/LoadSnapshotChunk", ); self.inner.unary(request.into_request(), path, codec).await } pub async fn apply_snapshot_chunk( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestApplySnapshotChunk>, ) -> Result< tonic::Response<::tendermint_proto::abci::ResponseApplySnapshotChunk>, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tendermint.abci.ABCIApplication/ApplySnapshotChunk", ); self.inner.unary(request.into_request(), path, codec).await } pub async fn prepare_proposal( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestPrepareProposal>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tendermint.abci.ABCIApplication/PrepareProposal", ); self.inner.unary(request.into_request(), path, codec).await } pub async fn process_proposal( &mut self, request: impl tonic::IntoRequest<::tendermint_proto::abci::RequestProcessProposal>, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/tendermint.abci.ABCIApplication/ProcessProposal", ); self.inner.unary(request.into_request(), path, codec).await } } } /// Generated server implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod abci_application_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with AbciApplicationServer. #[async_trait] pub trait AbciApplication: Send + Sync + 'static { async fn echo( &self, request: tonic::Request<::tendermint_proto::abci::RequestEcho>, ) -> Result, tonic::Status>; async fn flush( &self, request: tonic::Request<::tendermint_proto::abci::RequestFlush>, ) -> Result, tonic::Status>; async fn info( &self, request: tonic::Request<::tendermint_proto::abci::RequestInfo>, ) -> Result, tonic::Status>; async fn deliver_tx( &self, request: tonic::Request<::tendermint_proto::abci::RequestDeliverTx>, ) -> Result, tonic::Status>; async fn check_tx( &self, request: tonic::Request<::tendermint_proto::abci::RequestCheckTx>, ) -> Result, tonic::Status>; async fn query( &self, request: tonic::Request<::tendermint_proto::abci::RequestQuery>, ) -> Result, tonic::Status>; async fn commit( &self, request: tonic::Request<::tendermint_proto::abci::RequestCommit>, ) -> Result, tonic::Status>; async fn init_chain( &self, request: tonic::Request<::tendermint_proto::abci::RequestInitChain>, ) -> Result, tonic::Status>; async fn begin_block( &self, request: tonic::Request<::tendermint_proto::abci::RequestBeginBlock>, ) -> Result, tonic::Status>; async fn end_block( &self, request: tonic::Request<::tendermint_proto::abci::RequestEndBlock>, ) -> Result, tonic::Status>; async fn list_snapshots( &self, request: tonic::Request<::tendermint_proto::abci::RequestListSnapshots>, ) -> Result, tonic::Status>; async fn offer_snapshot( &self, request: tonic::Request<::tendermint_proto::abci::RequestOfferSnapshot>, ) -> Result, tonic::Status>; async fn load_snapshot_chunk( &self, request: tonic::Request<::tendermint_proto::abci::RequestLoadSnapshotChunk>, ) -> Result< tonic::Response<::tendermint_proto::abci::ResponseLoadSnapshotChunk>, tonic::Status, >; async fn apply_snapshot_chunk( &self, request: tonic::Request<::tendermint_proto::abci::RequestApplySnapshotChunk>, ) -> Result< tonic::Response<::tendermint_proto::abci::ResponseApplySnapshotChunk>, tonic::Status, >; async fn prepare_proposal( &self, request: tonic::Request<::tendermint_proto::abci::RequestPrepareProposal>, ) -> Result, tonic::Status>; async fn process_proposal( &self, request: tonic::Request<::tendermint_proto::abci::RequestProcessProposal>, ) -> Result, tonic::Status>; } #[derive(Debug)] pub struct AbciApplicationServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, } struct _Inner(Arc); impl AbciApplicationServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), } } pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } } impl tonic::codegen::Service> for AbciApplicationServer where T: AbciApplication, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/tendermint.abci.ABCIApplication/Echo" => { #[allow(non_camel_case_types)] struct EchoSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestEcho> for EchoSvc { type Response = ::tendermint_proto::abci::ResponseEcho; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestEcho>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).echo(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = EchoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/Flush" => { #[allow(non_camel_case_types)] struct FlushSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestFlush> for FlushSvc { type Response = ::tendermint_proto::abci::ResponseFlush; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestFlush>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).flush(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = FlushSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/Info" => { #[allow(non_camel_case_types)] struct InfoSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestInfo> for InfoSvc { type Response = ::tendermint_proto::abci::ResponseInfo; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestInfo>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).info(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = InfoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/DeliverTx" => { #[allow(non_camel_case_types)] struct DeliverTxSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestDeliverTx> for DeliverTxSvc { type Response = ::tendermint_proto::abci::ResponseDeliverTx; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestDeliverTx>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).deliver_tx(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = DeliverTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/CheckTx" => { #[allow(non_camel_case_types)] struct CheckTxSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestCheckTx> for CheckTxSvc { type Response = ::tendermint_proto::abci::ResponseCheckTx; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestCheckTx>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).check_tx(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = CheckTxSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/Query" => { #[allow(non_camel_case_types)] struct QuerySvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestQuery> for QuerySvc { type Response = ::tendermint_proto::abci::ResponseQuery; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestQuery>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).query(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = QuerySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/Commit" => { #[allow(non_camel_case_types)] struct CommitSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestCommit> for CommitSvc { type Response = ::tendermint_proto::abci::ResponseCommit; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestCommit>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).commit(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = CommitSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/InitChain" => { #[allow(non_camel_case_types)] struct InitChainSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestInitChain> for InitChainSvc { type Response = ::tendermint_proto::abci::ResponseInitChain; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestInitChain>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).init_chain(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = InitChainSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/BeginBlock" => { #[allow(non_camel_case_types)] struct BeginBlockSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestBeginBlock> for BeginBlockSvc { type Response = ::tendermint_proto::abci::ResponseBeginBlock; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestBeginBlock>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).begin_block(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = BeginBlockSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/EndBlock" => { #[allow(non_camel_case_types)] struct EndBlockSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestEndBlock> for EndBlockSvc { type Response = ::tendermint_proto::abci::ResponseEndBlock; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestEndBlock>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).end_block(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = EndBlockSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/ListSnapshots" => { #[allow(non_camel_case_types)] struct ListSnapshotsSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestListSnapshots> for ListSnapshotsSvc { type Response = ::tendermint_proto::abci::ResponseListSnapshots; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestListSnapshots>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).list_snapshots(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = ListSnapshotsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/OfferSnapshot" => { #[allow(non_camel_case_types)] struct OfferSnapshotSvc(pub Arc); impl tonic::server::UnaryService<::tendermint_proto::abci::RequestOfferSnapshot> for OfferSnapshotSvc { type Response = ::tendermint_proto::abci::ResponseOfferSnapshot; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request<::tendermint_proto::abci::RequestOfferSnapshot>, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).offer_snapshot(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = OfferSnapshotSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/LoadSnapshotChunk" => { #[allow(non_camel_case_types)] struct LoadSnapshotChunkSvc(pub Arc); impl tonic::server::UnaryService< ::tendermint_proto::abci::RequestLoadSnapshotChunk, > for LoadSnapshotChunkSvc { type Response = ::tendermint_proto::abci::ResponseLoadSnapshotChunk; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< ::tendermint_proto::abci::RequestLoadSnapshotChunk, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).load_snapshot_chunk(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = LoadSnapshotChunkSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/ApplySnapshotChunk" => { #[allow(non_camel_case_types)] struct ApplySnapshotChunkSvc(pub Arc); impl tonic::server::UnaryService< ::tendermint_proto::abci::RequestApplySnapshotChunk, > for ApplySnapshotChunkSvc { type Response = ::tendermint_proto::abci::ResponseApplySnapshotChunk; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< ::tendermint_proto::abci::RequestApplySnapshotChunk, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).apply_snapshot_chunk(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = ApplySnapshotChunkSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/PrepareProposal" => { #[allow(non_camel_case_types)] struct PrepareProposalSvc(pub Arc); impl tonic::server::UnaryService< ::tendermint_proto::abci::RequestPrepareProposal, > for PrepareProposalSvc { type Response = ::tendermint_proto::abci::ResponsePrepareProposal; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< ::tendermint_proto::abci::RequestPrepareProposal, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).prepare_proposal(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = PrepareProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/tendermint.abci.ABCIApplication/ProcessProposal" => { #[allow(non_camel_case_types)] struct ProcessProposalSvc(pub Arc); impl tonic::server::UnaryService< ::tendermint_proto::abci::RequestProcessProposal, > for ProcessProposalSvc { type Response = ::tendermint_proto::abci::ResponseProcessProposal; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< ::tendermint_proto::abci::RequestProcessProposal, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).process_proposal(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = ProcessProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => Box::pin(async move { Ok(http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap()) }), } } } impl Clone for AbciApplicationServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(self.0.clone()) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for AbciApplicationServer { const NAME: &'static str = "tendermint.abci.ABCIApplication"; } }