pub struct MockRuntime { /* private fields */ }Implementations§
Source§impl MockRuntime
impl MockRuntime
pub fn storage_write<K: AsRef<[u8]>, P: AsRef<[u8]>, V: AsRef<[u8]>>( &self, key: K, prefix: P, val: V, ) -> &Self
pub fn storage_read(&self, key: &[u8], prefix: &[u8]) -> Option<Vec<u8>>
pub fn storage_delete(&self, key: &[u8], prefix: &[u8]) -> &Self
pub fn block_time(&self, time: u64) -> &Self
pub fn block_height(&self, height: u64) -> &Self
pub fn self_address(&self, addr: &Address) -> &Self
pub fn caller_address(&self, caller: &Address) -> &Self
pub fn origin_address(&self, origin: &Address) -> &Self
pub fn tx_hash(&self, tx_hash: &H256) -> &Self
pub fn call_contracts<T: Encode>(&self, call_rets: Vec<T>) -> &Self
pub fn call_contract<T: Encode>(&self, call_ret: T) -> &Self
pub fn input(&self, _dis: &[u8]) -> &Self
pub fn ret(&self, msg: &[u8]) -> &Self
pub fn get_log(&self, level: LogLevel) -> Vec<Vec<u8>>
pub fn get_event(&self) -> Vec<Vec<u8>>
pub fn get_ret(&self) -> Vec<u8> ⓘ
Auto Trait Implementations§
impl Freeze for MockRuntime
impl !RefUnwindSafe for MockRuntime
impl !Send for MockRuntime
impl !Sync for MockRuntime
impl Unpin for MockRuntime
impl !UnwindSafe for MockRuntime
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