pub struct ScenarioEnvExec<'w> {
pub world: &'w mut ScenarioWorld,
pub data: ScenarioTxEnvData,
}
Expand description
Environment for executing transactions.
Fields§
§world: &'w mut ScenarioWorld
§data: ScenarioTxEnvData
Trait Implementations§
Source§impl ScenarioTxEnv for ScenarioEnvExec<'_>
impl ScenarioTxEnv for ScenarioEnvExec<'_>
fn env_data(&self) -> &ScenarioTxEnvData
Source§impl TxEnv for ScenarioEnvExec<'_>
impl TxEnv for ScenarioEnvExec<'_>
type Api = VMHooksApi<StaticApiBackend>
Source§type RHExpect = TxExpect
type RHExpect = TxExpect
Type built by result handlers that translates into the “expect” section in scenarios.
fn resolve_sender_address(&self) -> ManagedAddress<Self::Api>
fn default_gas_annotation(&self) -> ManagedBuffer<Self::Api>
fn default_gas_value(&self) -> u64
Source§impl TxEnvMockDeployAddress for ScenarioEnvExec<'_>
impl TxEnvMockDeployAddress for ScenarioEnvExec<'_>
fn mock_deploy_new_address<From, NA>(&mut self, from: &From, new_address: NA)
Source§impl TxEnvWithTxHash for ScenarioEnvExec<'_>
impl TxEnvWithTxHash for ScenarioEnvExec<'_>
fn set_tx_hash(&mut self, tx_hash: H256)
Source§fn take_tx_hash(&mut self) -> Option<H256>
fn take_tx_hash(&mut self) -> Option<H256>
Retrieves current tx hash, while resetting it in self.
Auto Trait Implementations§
impl<'w> Freeze for ScenarioEnvExec<'w>
impl<'w> !RefUnwindSafe for ScenarioEnvExec<'w>
impl<'w> Send for ScenarioEnvExec<'w>
impl<'w> Sync for ScenarioEnvExec<'w>
impl<'w> Unpin for ScenarioEnvExec<'w>
impl<'w> !UnwindSafe for ScenarioEnvExec<'w>
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
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more