[−][src]Struct cosmwasm_vm::testing::MockQuerier
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]
&mut self,
addr: U,
balance: Vec<Coin>
) -> Option<Vec<Coin>>
pub fn update_staking(
&mut self,
denom: &str,
validators: &[Validator],
delegations: &[FullDelegation]
)[src]
&mut self,
denom: &str,
validators: &[Validator],
delegations: &[FullDelegation]
)
pub fn with_custom_handler<CH: 'static>(self, handler: CH) -> Self where
CH: Fn(&C) -> MockQuerierCustomHandlerResult, [src]
CH: Fn(&C) -> MockQuerierCustomHandlerResult,
impl MockQuerier[src]
pub fn query<C: CustomQuery>(
&self,
request: &QueryRequest<C>,
gas_limit: u64
) -> BackendResult<SystemResult<ContractResult<Binary>>>[src]
&self,
request: &QueryRequest<C>,
gas_limit: u64
) -> BackendResult<SystemResult<ContractResult<Binary>>>
Trait Implementations
impl<C: CustomQuery + DeserializeOwned> Querier for MockQuerier<C>[src]
pub fn query_raw(
&self,
bin_request: &[u8],
gas_limit: u64
) -> BackendResult<SystemResult<ContractResult<Binary>>>[src]
&self,
bin_request: &[u8],
gas_limit: u64
) -> BackendResult<SystemResult<ContractResult<Binary>>>
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]
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> Same<T> for T
type Output = T
Should always be Self
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>,