pub trait QueryService: Send + Sync + 'static {
    type ValidatorInfoStream: Stream<Item = Result<ValidatorInfoResponse, Status>> + Send + 'static;

    // Required methods
    fn get_validator_info<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetValidatorInfoRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetValidatorInfoResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validator_info<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ValidatorInfoRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ValidatorInfoStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validator_status<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ValidatorStatusRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorStatusResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validator_penalty<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ValidatorPenaltyRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorPenaltyResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn current_validator_rate<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CurrentValidatorRateRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<CurrentValidatorRateResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validator_uptime<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ValidatorUptimeRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorUptimeResponse>, 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 ValidatorInfoStream: Stream<Item = Result<ValidatorInfoResponse, Status>> + Send + 'static

Server streaming response type for the ValidatorInfo method.

Required Methods§

source

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

Queries for information about a specific validator.

source

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

Queries the current validator set, with filtering.

source

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

source

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

source

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

source

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

Implementors§