pub struct Module { /* private fields */ }Implementations§
Source§impl Module
impl Module
pub fn new(rpc: Rc<HttpClient>) -> Self
Sourcepub async fn validator(
&self,
validator_addr: &str,
) -> Result<QueryValidatorResponse, CosmosClient>
pub async fn validator( &self, validator_addr: &str, ) -> Result<QueryValidatorResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn validators(
&self,
status: &str,
pagination: Option<PageRequest>,
) -> Result<QueryValidatorsResponse, CosmosClient>
pub async fn validators( &self, status: &str, pagination: Option<PageRequest>, ) -> Result<QueryValidatorsResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn validator_delegations(
&self,
validator_addr: &str,
pagination: Option<PageRequest>,
) -> Result<QueryValidatorDelegationsResponse, CosmosClient>
pub async fn validator_delegations( &self, validator_addr: &str, pagination: Option<PageRequest>, ) -> Result<QueryValidatorDelegationsResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn validator_unbonding_delegations(
&self,
validator_addr: &str,
pagination: Option<PageRequest>,
) -> Result<QueryValidatorUnbondingDelegationsResponse, CosmosClient>
pub async fn validator_unbonding_delegations( &self, validator_addr: &str, pagination: Option<PageRequest>, ) -> Result<QueryValidatorUnbondingDelegationsResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn delegation(
&self,
delegator_addr: &str,
validator_addr: &str,
) -> Result<QueryDelegationResponse, CosmosClient>
pub async fn delegation( &self, delegator_addr: &str, validator_addr: &str, ) -> Result<QueryDelegationResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn unbonding_delegation(
&self,
delegator_addr: &str,
validator_addr: &str,
) -> Result<QueryUnbondingDelegationResponse, CosmosClient>
pub async fn unbonding_delegation( &self, delegator_addr: &str, validator_addr: &str, ) -> Result<QueryUnbondingDelegationResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn delegator_delegations(
&self,
delegator_addr: &str,
pagination: Option<PageRequest>,
) -> Result<QueryDelegatorDelegationsResponse, CosmosClient>
pub async fn delegator_delegations( &self, delegator_addr: &str, pagination: Option<PageRequest>, ) -> Result<QueryDelegatorDelegationsResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn delegator_unbonding_delegations(
&self,
delegator_addr: &str,
pagination: Option<PageRequest>,
) -> Result<QueryDelegatorUnbondingDelegationsResponse, CosmosClient>
pub async fn delegator_unbonding_delegations( &self, delegator_addr: &str, pagination: Option<PageRequest>, ) -> Result<QueryDelegatorUnbondingDelegationsResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn redelegations(
&self,
delegator_addr: &str,
src_validator_addr: &str,
dst_validator_addr: &str,
pagination: Option<PageRequest>,
) -> Result<QueryRedelegationsResponse, CosmosClient>
pub async fn redelegations( &self, delegator_addr: &str, src_validator_addr: &str, dst_validator_addr: &str, pagination: Option<PageRequest>, ) -> Result<QueryRedelegationsResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn delegator_validators(
&self,
delegator_addr: &str,
pagination: Option<PageRequest>,
) -> Result<QueryDelegatorValidatorsResponse, CosmosClient>
pub async fn delegator_validators( &self, delegator_addr: &str, pagination: Option<PageRequest>, ) -> Result<QueryDelegatorValidatorsResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn delegator_validator(
&self,
delegator_addr: &str,
validator_addr: &str,
) -> Result<QueryDelegatorValidatorResponse, CosmosClient>
pub async fn delegator_validator( &self, delegator_addr: &str, validator_addr: &str, ) -> Result<QueryDelegatorValidatorResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn historical_info(
&self,
height: i64,
) -> Result<QueryHistoricalInfoResponse, CosmosClient>
pub async fn historical_info( &self, height: i64, ) -> Result<QueryHistoricalInfoResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn pool(&self) -> Result<QueryPoolResponse, CosmosClient>
pub async fn pool(&self) -> Result<QueryPoolResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Sourcepub async fn params(&self) -> Result<QueryParamsResponse, CosmosClient>
pub async fn params(&self) -> Result<QueryParamsResponse, CosmosClient>
§Errors
Will return Err if :
- a prost encode / decode fail
- the json-rpc return an error code
- if there is some network error
Auto Trait Implementations§
impl Freeze for Module
impl !RefUnwindSafe for Module
impl !Send for Module
impl !Sync for Module
impl Unpin for Module
impl !UnwindSafe for Module
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request