[][src]Struct cosmwasm_std::testing::MockQuerier

pub struct MockQuerier<C: DeserializeOwned = Empty> { /* fields omitted */ }

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]

pub fn with_custom_handler<CH: 'static>(self, handler: CH) -> Self where
    CH: Fn(&C) -> MockQuerierCustomHandlerResult
[src]

impl<C: CustomQuery + DeserializeOwned> MockQuerier<C>[src]

pub fn handle_query(&self, request: &QueryRequest<C>) -> QuerierResult[src]

Trait Implementations

impl<C: CustomQuery + DeserializeOwned> Querier for MockQuerier<C>[src]

Auto Trait Implementations

impl<C = Empty> !RefUnwindSafe for MockQuerier<C>

impl<C = Empty> !Send for MockQuerier<C>

impl<C = Empty> !Sync for MockQuerier<C>

impl<C> Unpin for MockQuerier<C>

impl<C = Empty> !UnwindSafe for MockQuerier<C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.