Struct cosmwasm_std::QuerierWrapper [−][src]
pub struct QuerierWrapper<'a>(_);
Implementations
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.
pub fn custom_query<C: CustomQuery, U: DeserializeOwned>(
&self,
request: &QueryRequest<C>
) -> StdResult<U>
pub fn custom_query<C: CustomQuery, U: DeserializeOwned>(
&self,
request: &QueryRequest<C>
) -> StdResult<U>
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.
Any error (System Error, Error or called contract, or Parse Error) are flattened into one level. Only use this if you don’t need to check the SystemError eg. If you don’t differentiate between contract missing and contract returned error
pub fn query_balance(
&self,
address: impl Into<String>,
denom: impl Into<String>
) -> StdResult<Coin>
pub fn query_wasm_smart<T: DeserializeOwned>(
&self,
contract_addr: impl Into<String>,
msg: &impl Serialize
) -> StdResult<T>
pub fn query_wasm_raw(
&self,
contract_addr: impl Into<String>,
key: impl Into<Binary>
) -> StdResult<Option<Vec<u8>>>
pub fn query_all_delegations(
&self,
delegator: impl Into<String>
) -> StdResult<Vec<Delegation>>
pub fn query_delegation(
&self,
delegator: impl Into<String>,
validator: impl Into<String>
) -> StdResult<Option<FullDelegation>>
Trait Implementations
This allows us to use self.raw_query to access the querier. It also allows external callers to access the querier easily.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for QuerierWrapper<'a>
impl<'a> !Send for QuerierWrapper<'a>
impl<'a> !Sync for QuerierWrapper<'a>
impl<'a> Unpin for QuerierWrapper<'a>
impl<'a> !UnwindSafe for QuerierWrapper<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self