[][src]Struct evm::State

pub struct State<'a, M, P: Patch> {
    pub patch: &'a P,
    pub memory: M,
    pub stack: Stack,
    pub context: Context,
    pub out: Rc<Vec<u8>>,
    pub ret: Rc<Vec<u8>>,
    pub memory_cost: Gas,
    pub used_gas: GasUsage,
    pub refunded_gas: Gas,
    pub account_state: AccountState<'a, P::Account>,
    pub logs: Vec<Log>,
    pub removed: Vec<Address>,
    pub depth: usize,
    pub valids: Valids,
    pub position: usize,
}

A VM state without PC.

Fields

patch: &'a P

Current patch

memory: M

Memory of this runtime.

stack: Stack

Stack of this runtime.

context: Context

Context.

out: Rc<Vec<u8>>

The current out value.

ret: Rc<Vec<u8>>

Return data buffer.

memory_cost: Gas

The current memory cost. Note that this is different from memory gas.

used_gas: GasUsage

Used gas excluding memory gas.

refunded_gas: Gas

Refunded gas.

account_state: AccountState<'a, P::Account>

The current account commitment states.

logs: Vec<Log>

Logs appended.

removed: Vec<Address>

All removed accounts using the SUICIDE opcode.

depth: usize

Depth of this runtime.

valids: Valids

Code valid maps.

position: usize

PC position.

Methods

impl<'a, M, P: Patch> State<'a, M, P>[src]

pub fn memory_gas(&self) -> Gas[src]

Memory gas, part of total used gas.

pub fn available_gas(&self) -> Gas[src]

Available gas at this moment.

pub fn total_used_gas(&self) -> Gas[src]

Total used gas including the memory gas.

Auto Trait Implementations

impl<'a, M, P> !Send for State<'a, M, P>

impl<'a, M, P> !Sync for State<'a, M, P>

Blanket Implementations

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self