[−][src]Struct cosmwasm_std::QuerierWrapper
Implementations
impl<'a> QuerierWrapper<'a>
[src]
pub fn new(querier: &'a dyn Querier) -> Self
[src]
pub fn query<T: DeserializeOwned>(
&self,
request: &QueryRequest<Empty>
) -> StdResult<T>
[src]
&self,
request: &QueryRequest<Empty>
) -> StdResult<T>
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>
[src]
&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<U: Into<HumanAddr>>(
&self,
address: U,
denom: &str
) -> StdResult<Coin>
[src]
&self,
address: U,
denom: &str
) -> StdResult<Coin>
pub fn query_all_balances<U: Into<HumanAddr>>(
&self,
address: U
) -> StdResult<Vec<Coin>>
[src]
&self,
address: U
) -> StdResult<Vec<Coin>>
pub fn query_wasm_smart<T: DeserializeOwned, U: Serialize, V: Into<HumanAddr>>(
&self,
contract: V,
msg: &U
) -> StdResult<T>
[src]
&self,
contract: V,
msg: &U
) -> StdResult<T>
pub fn query_wasm_raw<T: Into<HumanAddr>, U: Into<Binary>>(
&self,
contract: T,
key: U
) -> StdResult<Option<Vec<u8>>>
[src]
&self,
contract: T,
key: U
) -> StdResult<Option<Vec<u8>>>
Trait Implementations
impl<'a> Clone for QuerierWrapper<'a>
[src]
pub fn clone(&self) -> QuerierWrapper<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for QuerierWrapper<'a>
[src]
impl<'a> Deref for QuerierWrapper<'a>
[src]
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>
[src]
impl<'a> !Send for QuerierWrapper<'a>
[src]
impl<'a> !Sync for QuerierWrapper<'a>
[src]
impl<'a> Unpin for QuerierWrapper<'a>
[src]
impl<'a> !UnwindSafe for QuerierWrapper<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,