pub struct WasmMockQuerier {
pub base: MockQuerier,
}
Fields§
§base: MockQuerier
Implementations§
Source§impl WasmMockQuerier
impl WasmMockQuerier
Sourcepub fn handle_query(&self, request: &QueryRequest<Empty>) -> QuerierResult
pub fn handle_query(&self, request: &QueryRequest<Empty>) -> QuerierResult
A custom query handler that provides custom handling for the mock contract addresses provided in this crate.
Each contract address has its own handler within the Querier and is called when the contract address is set as such.
A custom response is added for cosmwasm_std::ContractInfo
queries that returns a code id of 2 for INVALID_CONTRACT
and 1 for all other addresses.
Any other addresses are handled by the default querier.
pub fn new(base: MockQuerier) -> Self
Trait Implementations§
Source§impl Querier for WasmMockQuerier
impl Querier for WasmMockQuerier
Source§fn raw_query(&self, bin_request: &[u8]) -> QuerierResult
fn raw_query(&self, bin_request: &[u8]) -> QuerierResult
raw_query 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. People using the querier probably want one of the simpler auto-generated
helper methods
Auto Trait Implementations§
impl Freeze for WasmMockQuerier
impl !RefUnwindSafe for WasmMockQuerier
impl !Send for WasmMockQuerier
impl !Sync for WasmMockQuerier
impl Unpin for WasmMockQuerier
impl !UnwindSafe for WasmMockQuerier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more