[−][src]Struct cosmwasm_std::testing::MockQuerier
MockQuerier holds an immutable table of bank balances TODO: also allow querying contracts
Implementations
impl<C: DeserializeOwned> MockQuerier<C>
[src]
pub fn new(balances: &[(&HumanAddr, &[Coin])]) -> Self
[src]
pub fn update_balance<U: Into<HumanAddr>>(
&mut self,
addr: U,
balance: Vec<Coin>
) -> Option<Vec<Coin>>
[src]
&mut self,
addr: U,
balance: Vec<Coin>
) -> Option<Vec<Coin>>
pub fn with_custom_handler<CH: 'static>(self, handler: CH) -> Self where
CH: Fn(&C) -> MockQuerierCustomHandlerResult,
[src]
CH: Fn(&C) -> MockQuerierCustomHandlerResult,
impl<C: DeserializeOwned> MockQuerier<C>
[src]
pub fn handle_query(&self, request: &QueryRequest<C>) -> QuerierResult
[src]
Trait Implementations
impl<C: DeserializeOwned> Querier for MockQuerier<C>
[src]
fn raw_query(&self, bin_request: &[u8]) -> QuerierResult
[src]
fn query<T: DeserializeOwned>(
&self,
request: &QueryRequest<Never>
) -> StdResult<T>
[src]
&self,
request: &QueryRequest<Never>
) -> StdResult<T>
fn custom_query<T: Serialize, U: DeserializeOwned>(
&self,
request: &QueryRequest<T>
) -> StdResult<U>
[src]
&self,
request: &QueryRequest<T>
) -> StdResult<U>
fn query_balance<U: Into<HumanAddr>>(
&self,
address: U,
denom: &str
) -> StdResult<Coin>
[src]
&self,
address: U,
denom: &str
) -> StdResult<Coin>
fn query_all_balances<U: Into<HumanAddr>>(
&self,
address: U
) -> StdResult<Vec<Coin>>
[src]
&self,
address: U
) -> StdResult<Vec<Coin>>
Auto Trait Implementations
impl<C = Never> !RefUnwindSafe for MockQuerier<C>
impl<C = Never> !Send for MockQuerier<C>
impl<C = Never> !Sync for MockQuerier<C>
impl<C> Unpin for MockQuerier<C>
impl<C = Never> !UnwindSafe for MockQuerier<C>
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,
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, 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.
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>,