Struct fadroma::ensemble::EnsembleQuerier
source · [−]pub struct EnsembleQuerier { /* private fields */ }
Trait Implementations
sourceimpl Querier for EnsembleQuerier
impl Querier for EnsembleQuerier
sourcefn raw_query(&self, bin_request: &[u8]) -> QuerierResult
fn raw_query(&self, bin_request: &[u8]) -> QuerierResult
raw_query is all that must be implemented for the Querier. This allows us to pass through binary queries from one level to another without knowing the custom format, or we can decode it, with the knowledge of the allowed types. People using the querier probably want one of the simpler auto-generated helper methods Read more
sourcefn query<T>(&self, request: &QueryRequest<Empty>) -> Result<T, StdError> where
T: DeserializeOwned,
fn query<T>(&self, request: &QueryRequest<Empty>) -> Result<T, StdError> where
T: DeserializeOwned,
query is a shorthand for custom_query when we are not using a custom type, this allows us to avoid specifying “Empty” in all the type definitions. Read more
sourcefn custom_query<T, U>(&self, request: &QueryRequest<T>) -> Result<U, StdError> where
T: Serialize,
U: DeserializeOwned,
fn custom_query<T, U>(&self, request: &QueryRequest<T>) -> Result<U, StdError> where
T: Serialize,
U: DeserializeOwned,
Makes the query and parses the response. Also handles custom queries,
so you need to specify the custom query type in the function parameters.
If you are no using a custom query, just use query
for easier interface. Read more
fn query_balance<U>(&self, address: U, denom: &str) -> Result<Coin, StdError> where
U: Into<HumanAddr>,
fn query_all_balances<U>(
&self,
address: U
) -> Result<Vec<Coin, Global>, StdError> where
U: Into<HumanAddr>,
fn query_validators(&self) -> Result<Vec<Validator, Global>, StdError>
fn query_bonded_denom(&self) -> Result<String, StdError>
fn query_all_delegations<U>(
&self,
delegator: U
) -> Result<Vec<Delegation, Global>, StdError> where
U: Into<HumanAddr>,
fn query_delegation<U>(
&self,
delegator: U,
validator: U
) -> Result<Option<FullDelegation>, StdError> where
U: Into<HumanAddr>,
Auto Trait Implementations
impl !RefUnwindSafe for EnsembleQuerier
impl !Send for EnsembleQuerier
impl !Sync for EnsembleQuerier
impl Unpin for EnsembleQuerier
impl !UnwindSafe for EnsembleQuerier
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more