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

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: &[(&str, &[Coin])]) -> Self[src]

pub fn update_balance<U: Into<String>>(
    &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> Conv for T

impl<T> FmtForward for T

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

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

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

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.