Struct boot_core::cosmos_modules::distribution::query_client::QueryClient
pub struct QueryClient<T> { /* private fields */ }Expand description
Query defines the gRPC querier service for distribution module.
Implementations
impl QueryClient<Channel>
impl QueryClient<Channel>
impl<T> QueryClient<T>where
T: GrpcService<UnsyncBoxBody<Bytes, Status>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::Error: Into<Box<dyn Error + Sync + Send + 'static, Global>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody: 'static + Body<Data = Bytes> + Send,
<<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Sync + Send + 'static, Global>> + Send,
impl<T> QueryClient<T>where
T: GrpcService<UnsyncBoxBody<Bytes, Status>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::Error: Into<Box<dyn Error + Sync + Send + 'static, Global>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody: 'static + Body<Data = Bytes> + Send,
<<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Sync + Send + 'static, Global>> + Send,
pub fn new(inner: T) -> QueryClient<T>
pub fn with_origin(inner: T, origin: Uri) -> QueryClient<T>
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> QueryClient<InterceptedService<T, F>>where
F: Interceptor,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody: Default,
T: Service<Request<UnsyncBoxBody<Bytes, Status>>, Response = Response<<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody>>,
<T as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Error: Into<Box<dyn Error + Sync + Send + 'static, Global>> + Send + Sync,
pub fn send_compressed(self, encoding: CompressionEncoding) -> QueryClient<T>
pub fn send_compressed(self, encoding: CompressionEncoding) -> QueryClient<T>
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
pub fn accept_compressed(self, encoding: CompressionEncoding) -> QueryClient<T>
pub fn accept_compressed(self, encoding: CompressionEncoding) -> QueryClient<T>
Enable decompressing responses.
pub async fn params(
&mut self,
request: impl IntoRequest<QueryParamsRequest>
) -> impl Future<Output = Result<Response<QueryParamsResponse>, Status>>
pub async fn params(
&mut self,
request: impl IntoRequest<QueryParamsRequest>
) -> impl Future<Output = Result<Response<QueryParamsResponse>, Status>>
Params queries params of the distribution module.
pub async fn validator_outstanding_rewards(
&mut self,
request: impl IntoRequest<QueryValidatorOutstandingRewardsRequest>
) -> impl Future<Output = Result<Response<QueryValidatorOutstandingRewardsResponse>, Status>>
pub async fn validator_outstanding_rewards(
&mut self,
request: impl IntoRequest<QueryValidatorOutstandingRewardsRequest>
) -> impl Future<Output = Result<Response<QueryValidatorOutstandingRewardsResponse>, Status>>
ValidatorOutstandingRewards queries rewards of a validator address.
pub async fn validator_commission(
&mut self,
request: impl IntoRequest<QueryValidatorCommissionRequest>
) -> impl Future<Output = Result<Response<QueryValidatorCommissionResponse>, Status>>
pub async fn validator_commission(
&mut self,
request: impl IntoRequest<QueryValidatorCommissionRequest>
) -> impl Future<Output = Result<Response<QueryValidatorCommissionResponse>, Status>>
ValidatorCommission queries accumulated commission for a validator.
pub async fn validator_slashes(
&mut self,
request: impl IntoRequest<QueryValidatorSlashesRequest>
) -> impl Future<Output = Result<Response<QueryValidatorSlashesResponse>, Status>>
pub async fn validator_slashes(
&mut self,
request: impl IntoRequest<QueryValidatorSlashesRequest>
) -> impl Future<Output = Result<Response<QueryValidatorSlashesResponse>, Status>>
ValidatorSlashes queries slash events of a validator.
pub async fn delegation_rewards(
&mut self,
request: impl IntoRequest<QueryDelegationRewardsRequest>
) -> impl Future<Output = Result<Response<QueryDelegationRewardsResponse>, Status>>
pub async fn delegation_rewards(
&mut self,
request: impl IntoRequest<QueryDelegationRewardsRequest>
) -> impl Future<Output = Result<Response<QueryDelegationRewardsResponse>, Status>>
DelegationRewards queries the total rewards accrued by a delegation.
pub async fn delegation_total_rewards(
&mut self,
request: impl IntoRequest<QueryDelegationTotalRewardsRequest>
) -> impl Future<Output = Result<Response<QueryDelegationTotalRewardsResponse>, Status>>
pub async fn delegation_total_rewards(
&mut self,
request: impl IntoRequest<QueryDelegationTotalRewardsRequest>
) -> impl Future<Output = Result<Response<QueryDelegationTotalRewardsResponse>, Status>>
DelegationTotalRewards queries the total rewards accrued by a each validator.
pub async fn delegator_validators(
&mut self,
request: impl IntoRequest<QueryDelegatorValidatorsRequest>
) -> impl Future<Output = Result<Response<QueryDelegatorValidatorsResponse>, Status>>
pub async fn delegator_validators(
&mut self,
request: impl IntoRequest<QueryDelegatorValidatorsRequest>
) -> impl Future<Output = Result<Response<QueryDelegatorValidatorsResponse>, Status>>
DelegatorValidators queries the validators of a delegator.
pub async fn delegator_withdraw_address(
&mut self,
request: impl IntoRequest<QueryDelegatorWithdrawAddressRequest>
) -> impl Future<Output = Result<Response<QueryDelegatorWithdrawAddressResponse>, Status>>
pub async fn delegator_withdraw_address(
&mut self,
request: impl IntoRequest<QueryDelegatorWithdrawAddressRequest>
) -> impl Future<Output = Result<Response<QueryDelegatorWithdrawAddressResponse>, Status>>
DelegatorWithdrawAddress queries withdraw address of a delegator.
pub async fn community_pool(
&mut self,
request: impl IntoRequest<QueryCommunityPoolRequest>
) -> impl Future<Output = Result<Response<QueryCommunityPoolResponse>, Status>>
pub async fn community_pool(
&mut self,
request: impl IntoRequest<QueryCommunityPoolRequest>
) -> impl Future<Output = Result<Response<QueryCommunityPoolResponse>, Status>>
CommunityPool queries the community pool coins.
Trait Implementations
impl<T> Clone for QueryClient<T>where
T: Clone,
impl<T> Clone for QueryClient<T>where
T: Clone,
fn clone(&self) -> QueryClient<T>
fn clone(&self) -> QueryClient<T>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations
impl<T> RefUnwindSafe for QueryClient<T>where
T: RefUnwindSafe,
impl<T> Send for QueryClient<T>where
T: Send,
impl<T> Sync for QueryClient<T>where
T: Sync,
impl<T> Unpin for QueryClient<T>where
T: Unpin,
impl<T> UnwindSafe for QueryClient<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request