[][src]Struct evm::ContextVM

pub struct ContextVM<M, P: Patch> { /* fields omitted */ }

A VM that executes using a context and block information.

Methods

impl<M: Memory + Default, P: Patch> ContextVM<M, P>
[src]

pub fn new(context: Context, block: HeaderParams) -> Self
[src]

Create a new VM using the given context, block header and patch.

pub fn with_states(
    context: Context,
    block: HeaderParams,
    account_state: AccountState<P::Account>,
    blockhash_state: BlockhashState
) -> Self
[src]

Create a new VM with the given account state and blockhash state.

pub fn with_init<F: FnOnce(&mut ContextVM<M, P>)>(
    context: Context,
    block: HeaderParams,
    account_state: AccountState<P::Account>,
    blockhash_state: BlockhashState,
    f: F
) -> Self
[src]

Create a new VM with customized initialization code.

pub fn with_previous(
    context: Context,
    block: HeaderParams,
    vm: &ContextVM<M, P>
) -> Self
[src]

Create a new VM with the result of the previous VM. This is usually used by transaction for chainning them.

pub fn current_state(&self) -> &State<M, P>
[src]

Returns the current state of the VM.

pub fn current_machine(&self) -> &Machine<M, P>
[src]

Returns the current runtime machine.

pub fn add_context_history_hook<F: 'static + Fn(&Context)>(&mut self, f: F)
[src]

Add a new context history hook.

Trait Implementations

impl<M: Memory + Default, P: Patch> VM for ContextVM<M, P>
[src]

Auto Trait Implementations

impl<M, P> !Send for ContextVM<M, P>

impl<M, P> !Sync for ContextVM<M, P>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self