pub trait QueryService: Send + Sync + 'static {
    type ProposalListStream: Stream<Item = Result<ProposalListResponse, Status>> + Send + 'static;
    type ValidatorVotesStream: Stream<Item = Result<ValidatorVotesResponse, Status>> + Send + 'static;
    type AllTalliedDelegatorVotesForProposalStream: Stream<Item = Result<AllTalliedDelegatorVotesForProposalResponse, Status>> + Send + 'static;
    type ProposalRateDataStream: Stream<Item = Result<ProposalRateDataResponse, Status>> + Send + 'static;

    // Required methods
    fn proposal_info<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ProposalInfoRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ProposalInfoResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn proposal_list<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ProposalListRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ProposalListStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn proposal_data<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ProposalDataRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ProposalDataResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn next_proposal_id<'life0, 'async_trait>(
        &'life0 self,
        request: Request<NextProposalIdRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<NextProposalIdResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validator_votes<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ValidatorVotesRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ValidatorVotesStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn voting_power_at_proposal_start<'life0, 'async_trait>(
        &'life0 self,
        request: Request<VotingPowerAtProposalStartRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<VotingPowerAtProposalStartResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn all_tallied_delegator_votes_for_proposal<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AllTalliedDelegatorVotesForProposalRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::AllTalliedDelegatorVotesForProposalStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn proposal_rate_data<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ProposalRateDataRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ProposalRateDataStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature rpc only.
Expand description

Generated trait containing gRPC methods that should be implemented for use with QueryServiceServer.

Required Associated Types§

source

type ProposalListStream: Stream<Item = Result<ProposalListResponse, Status>> + Send + 'static

Server streaming response type for the ProposalList method.

source

type ValidatorVotesStream: Stream<Item = Result<ValidatorVotesResponse, Status>> + Send + 'static

Server streaming response type for the ValidatorVotes method.

source

type AllTalliedDelegatorVotesForProposalStream: Stream<Item = Result<AllTalliedDelegatorVotesForProposalResponse, Status>> + Send + 'static

Server streaming response type for the AllTalliedDelegatorVotesForProposal method.

source

type ProposalRateDataStream: Stream<Item = Result<ProposalRateDataResponse, Status>> + Send + 'static

Server streaming response type for the ProposalRateData method.

Required Methods§

source

fn proposal_info<'life0, 'async_trait>( &'life0 self, request: Request<ProposalInfoRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<ProposalInfoResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn proposal_list<'life0, 'async_trait>( &'life0 self, request: Request<ProposalListRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ProposalListStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn proposal_data<'life0, 'async_trait>( &'life0 self, request: Request<ProposalDataRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<ProposalDataResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn next_proposal_id<'life0, 'async_trait>( &'life0 self, request: Request<NextProposalIdRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<NextProposalIdResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn validator_votes<'life0, 'async_trait>( &'life0 self, request: Request<ValidatorVotesRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ValidatorVotesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn voting_power_at_proposal_start<'life0, 'async_trait>( &'life0 self, request: Request<VotingPowerAtProposalStartRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<VotingPowerAtProposalStartResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn all_tallied_delegator_votes_for_proposal<'life0, 'async_trait>( &'life0 self, request: Request<AllTalliedDelegatorVotesForProposalRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::AllTalliedDelegatorVotesForProposalStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn proposal_rate_data<'life0, 'async_trait>( &'life0 self, request: Request<ProposalRateDataRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ProposalRateDataStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Used for computing voting power ?

Implementors§