pub trait Query: Send + Sync + 'static {
// Required methods
fn proposal<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryProposalRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryProposalResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn proposals<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryProposalsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryProposalsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn vote<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryVoteRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryVoteResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn votes<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryVotesRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryVotesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn params<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryParamsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryParamsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn deposit<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryDepositRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryDepositResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn deposits<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryDepositsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryDepositsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn tally_result<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryTallyResultRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryTallyResultResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with QueryServer.
Required Methods§
sourcefn proposal<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryProposalRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryProposalResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn proposal<'life0, 'async_trait>( &'life0 self, request: Request<QueryProposalRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<QueryProposalResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Proposal queries proposal details based on ProposalID.
sourcefn proposals<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryProposalsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryProposalsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn proposals<'life0, 'async_trait>( &'life0 self, request: Request<QueryProposalsRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<QueryProposalsResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Proposals queries all proposals based on given status.
sourcefn vote<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryVoteRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryVoteResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn vote<'life0, 'async_trait>( &'life0 self, request: Request<QueryVoteRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<QueryVoteResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Vote queries voted information based on proposalID, voterAddr.
sourcefn votes<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryVotesRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryVotesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn votes<'life0, 'async_trait>( &'life0 self, request: Request<QueryVotesRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<QueryVotesResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Votes queries votes of a given proposal.
sourcefn params<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryParamsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryParamsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn params<'life0, 'async_trait>( &'life0 self, request: Request<QueryParamsRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<QueryParamsResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Params queries all parameters of the gov module.
sourcefn deposit<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryDepositRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryDepositResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn deposit<'life0, 'async_trait>( &'life0 self, request: Request<QueryDepositRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<QueryDepositResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Deposit queries single deposit information based proposalID, depositAddr.
sourcefn deposits<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryDepositsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryDepositsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn deposits<'life0, 'async_trait>( &'life0 self, request: Request<QueryDepositsRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<QueryDepositsResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Deposits queries all deposits of a single proposal.
sourcefn tally_result<'life0, 'async_trait>(
&'life0 self,
request: Request<QueryTallyResultRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<QueryTallyResultResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tally_result<'life0, 'async_trait>( &'life0 self, request: Request<QueryTallyResultRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<QueryTallyResultResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
TallyResult queries the tally of a proposal vote.