pub struct Mock<S: StateInterface = MockState> {
pub sender: Addr,
pub state: Rc<RefCell<S>>,
pub app: Rc<RefCell<App>>,
}
Fields
sender: Addr
state: Rc<RefCell<S>>
app: Rc<RefCell<App>>
Implementations
Trait Implementations
sourceimpl<S: StateInterface> ChainState for Mock<S>
impl<S: StateInterface> ChainState for Mock<S>
sourceimpl<S: Clone + StateInterface> Clone for Mock<S>
impl<S: Clone + StateInterface> Clone for Mock<S>
sourceimpl<S: StateInterface> TxHandler for Mock<S>
impl<S: StateInterface> TxHandler for Mock<S>
type Response = AppResponse
fn sender(&self) -> Addr
fn execute<E: Serialize + Debug>(
&self,
exec_msg: &E,
coins: &[Coin],
contract_address: &Addr
) -> Result<Self::Response, BootError>
fn instantiate<I: Serialize + Debug>(
&self,
code_id: u64,
init_msg: &I,
label: Option<&str>,
admin: Option<&Addr>,
coins: &[Coin]
) -> Result<Self::Response, BootError>
fn query<Q: Serialize + Debug, T: Serialize + DeserializeOwned>(
&self,
query_msg: &Q,
contract_address: &Addr
) -> Result<T, BootError>
fn migrate<M: Serialize + Debug>(
&self,
migrate_msg: &M,
new_code_id: u64,
contract_address: &Addr
) -> Result<Self::Response, BootError>
fn upload(
&self,
contract_source: &mut ContractCodeReference<Empty>
) -> Result<Self::Response, BootError>
fn wait_blocks(&self, amount: u64) -> Result<(), BootError>
fn next_block(&self) -> Result<(), BootError>
Auto Trait Implementations
impl<S = MockState> !RefUnwindSafe for Mock<S>
impl<S = MockState> !Send for Mock<S>
impl<S = MockState> !Sync for Mock<S>
impl<S> Unpin for Mock<S>
impl<S = MockState> !UnwindSafe for Mock<S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request