[][src]Struct cosmwasm_vm::testing::MockQuerier

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

MockQuerier holds an immutable table of bank balances TODO: also allow querying contracts

Implementations

impl<C: CustomQuery + 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 update_staking(
    &mut self,
    denom: &str,
    validators: &[Validator],
    delegations: &[FullDelegation]
)
[src]

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

impl MockQuerier[src]

pub fn query<C: CustomQuery>(
    &self,
    request: &QueryRequest<C>,
    gas_limit: u64
) -> BackendResult<SystemResult<ContractResult<Binary>>>
[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> Same<T> for T

type Output = T

Should always be Self

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.