Struct cosmwasm_vm::testing::MockQuerier [−][src]
pub struct MockQuerier<C: CustomQuery + DeserializeOwned = Empty> { /* fields omitted */ }Expand description
MockQuerier holds an immutable table of bank balances TODO: also allow querying contracts
Implementations
pub fn update_staking(
&mut self,
denom: &str,
validators: &[Validator],
delegations: &[FullDelegation]
)
pub fn with_custom_handler<CH: 'static>(self, handler: CH) -> Self where
CH: Fn(&C) -> MockQuerierCustomHandlerResult,
pub fn query<C: CustomQuery>(
&self,
request: &QueryRequest<C>,
gas_limit: u64
) -> BackendResult<SystemResult<ContractResult<Binary>>>
Trait Implementations
fn query_raw(
&self,
bin_request: &[u8],
gas_limit: u64
) -> BackendResult<SystemResult<ContractResult<Binary>>>
fn query_raw(
&self,
bin_request: &[u8],
gas_limit: u64
) -> BackendResult<SystemResult<ContractResult<Binary>>>
This is all that must be implemented for the Querier. This allows us to pass through binary queries from one level to another without knowing the custom format, or we can decode it, with the knowledge of the allowed types. Read more
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
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more