pub struct NativeExecutor { /* private fields */ }
Implementations§
Source§impl NativeExecutor
impl NativeExecutor
Sourcepub fn in_memory(shard_index: ShardIndex) -> Result<Self, NativeExecutorError>
pub fn in_memory(shard_index: ShardIndex) -> Result<Self, NativeExecutorError>
Instantiate in-memory native executor.
Returns error in case of method duplicates.
Sourcepub fn with_env<F, T>(
&mut self,
context: Address,
caller: Address,
f: F,
) -> Result<T, ContractError>
pub fn with_env<F, T>( &mut self, context: Address, caller: Address, f: F, ) -> Result<T, ContractError>
Run a function under fresh execution environment
Sourcepub fn with_env_null<F, T>(&mut self, f: F) -> Result<T, ContractError>
pub fn with_env_null<F, T>(&mut self, f: F) -> Result<T, ContractError>
Shortcut for Self::with_env
with context and caller set to Address::NULL
Sourcepub fn deploy_system_contract_at<C>(&mut self, address: Address)where
C: Contract,
pub fn deploy_system_contract_at<C>(&mut self, address: Address)where
C: Contract,
Deploy a system contract at a known address.
It is used by convenient high-level helper method Self::deploy_typical_system_contracts()
and often doesn’t need to be called directly.
Auto Trait Implementations§
impl Freeze for NativeExecutor
impl !RefUnwindSafe for NativeExecutor
impl Send for NativeExecutor
impl Sync for NativeExecutor
impl Unpin for NativeExecutor
impl !UnwindSafe for NativeExecutor
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