Enum evm_gasometer::GasCost[][src]

pub enum GasCost {
Show variants Zero, Base, VeryLow, Low, Invalid, ExtCodeSize, Balance, BlockHash, ExtCodeHash, Call { value: U256, gas: U256, target_exists: bool, }, CallCode { value: U256, gas: U256, target_exists: bool, }, DelegateCall { gas: U256, target_exists: bool, }, StaticCall { gas: U256, target_exists: bool, }, Suicide { value: U256, target_exists: bool, already_removed: bool, }, SStore { original: H256, current: H256, new: H256, }, Sha3 { len: U256, }, Log { n: u8, len: U256, }, ExtCodeCopy { len: U256, }, VeryLowCopy { len: U256, }, Exp { power: U256, }, Create, Create2 { len: U256, }, SLoad,
}
Expand description

Gas cost.

Variants

Zero

Zero gas cost.

Base

Base gas cost.

VeryLow

Very low gas cost.

Low

Low gas cost.

Invalid

Fail the gasometer.

ExtCodeSize

Gas cost for EXTCODESIZE.

Balance

Gas cost for BALANCE.

BlockHash

Gas cost for BLOCKHASH.

ExtCodeHash

Gas cost for EXTBLOCKHASH.

Call

Gas cost for CALL.

Show fields

Fields of Call

value: U256

Call value.

gas: U256

Call gas.

target_exists: bool

Whether the target exists.

CallCode

Gas cost for `CALLCODE.

Show fields

Fields of CallCode

value: U256

Call value.

gas: U256

Call gas.

target_exists: bool

Whether the target exists.

DelegateCall

Gas cost for DELEGATECALL.

Show fields

Fields of DelegateCall

gas: U256

Call gas.

target_exists: bool

Whether the target exists.

StaticCall

Gas cost for STATICCALL.

Show fields

Fields of StaticCall

gas: U256

Call gas.

target_exists: bool

Whether the target exists.

Suicide

Gas cost for SUICIDE.

Show fields

Fields of Suicide

value: U256

Value.

target_exists: bool

Whether the target exists.

already_removed: bool

Whether the target has already been removed.

SStore

Gas cost for SSTORE.

Show fields

Fields of SStore

original: H256

Original value.

current: H256

Current value.

new: H256

New value.

Sha3

Gas cost for SHA3.

Show fields

Fields of Sha3

len: U256

Length of the data.

Log

Gas cost for LOG.

Show fields

Fields of Log

n: u8

Topic length.

len: U256

Data length.

ExtCodeCopy

Gas cost for EXTCODECOPY.

Show fields

Fields of ExtCodeCopy

len: U256

Length.

VeryLowCopy

Gas cost for some copy opcodes that is documented as VERYLOW.

Show fields

Fields of VeryLowCopy

len: U256

Length.

Exp

Gas cost for EXP.

Show fields

Fields of Exp

power: U256

Power of EXP.

Create

Gas cost for CREATE.

Create2

Gas cost for CREATE2.

Show fields

Fields of Create2

len: U256

Length.

SLoad

Gas cost for SLOAD.

Trait Implementations

impl Clone for GasCost[src]

fn clone(&self) -> GasCost[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for GasCost[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Copy for GasCost[src]

Auto Trait Implementations

impl RefUnwindSafe for GasCost

impl Send for GasCost

impl Sync for GasCost

impl Unpin for GasCost

impl UnwindSafe for GasCost

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.