Struct evm_core::Opcode

source ·
pub struct Opcode(pub u8);
Expand description

Opcode enum. One-to-one corresponding to an u8 value.

Tuple Fields§

§0: u8

Implementations§

source§

impl Opcode

source

pub const STOP: Opcode = _

STOP

source

pub const ADD: Opcode = _

ADD

source

pub const MUL: Opcode = _

MUL

source

pub const SUB: Opcode = _

SUB

source

pub const DIV: Opcode = _

DIV

source

pub const SDIV: Opcode = _

SDIV

source

pub const MOD: Opcode = _

MOD

source

pub const SMOD: Opcode = _

SMOD

source

pub const ADDMOD: Opcode = _

ADDMOD

source

pub const MULMOD: Opcode = _

MULMOD

source

pub const EXP: Opcode = _

EXP

source

pub const SIGNEXTEND: Opcode = _

SIGNEXTEND

source

pub const LT: Opcode = _

LT

source

pub const GT: Opcode = _

GT

source

pub const SLT: Opcode = _

SLT

source

pub const SGT: Opcode = _

SGT

source

pub const EQ: Opcode = _

EQ

source

pub const ISZERO: Opcode = _

ISZERO

source

pub const AND: Opcode = _

AND

source

pub const OR: Opcode = _

OR

source

pub const XOR: Opcode = _

XOR

source

pub const NOT: Opcode = _

NOT

source

pub const BYTE: Opcode = _

BYTE

source

pub const CALLDATALOAD: Opcode = _

CALLDATALOAD

source

pub const CALLDATASIZE: Opcode = _

CALLDATASIZE

source

pub const CALLDATACOPY: Opcode = _

CALLDATACOPY

source

pub const CODESIZE: Opcode = _

CODESIZE

source

pub const CODECOPY: Opcode = _

CODECOPY

source

pub const SHL: Opcode = _

SHL

source

pub const SHR: Opcode = _

SHR

source

pub const SAR: Opcode = _

SAR

source

pub const POP: Opcode = _

POP

source

pub const MLOAD: Opcode = _

MLOAD

source

pub const MSTORE: Opcode = _

MSTORE

source

pub const MSTORE8: Opcode = _

MSTORE8

source

pub const JUMP: Opcode = _

JUMP

source

pub const JUMPI: Opcode = _

JUMPI

source

pub const PC: Opcode = _

PC

source

pub const MSIZE: Opcode = _

MSIZE

source

pub const JUMPDEST: Opcode = _

JUMPDEST

source

pub const PUSH0: Opcode = _

PUSHn

source

pub const PUSH1: Opcode = _

source

pub const PUSH2: Opcode = _

source

pub const PUSH3: Opcode = _

source

pub const PUSH4: Opcode = _

source

pub const PUSH5: Opcode = _

source

pub const PUSH6: Opcode = _

source

pub const PUSH7: Opcode = _

source

pub const PUSH8: Opcode = _

source

pub const PUSH9: Opcode = _

source

pub const PUSH10: Opcode = _

source

pub const PUSH11: Opcode = _

source

pub const PUSH12: Opcode = _

source

pub const PUSH13: Opcode = _

source

pub const PUSH14: Opcode = _

source

pub const PUSH15: Opcode = _

source

pub const PUSH16: Opcode = _

source

pub const PUSH17: Opcode = _

source

pub const PUSH18: Opcode = _

source

pub const PUSH19: Opcode = _

source

pub const PUSH20: Opcode = _

source

pub const PUSH21: Opcode = _

source

pub const PUSH22: Opcode = _

source

pub const PUSH23: Opcode = _

source

pub const PUSH24: Opcode = _

source

pub const PUSH25: Opcode = _

source

pub const PUSH26: Opcode = _

source

pub const PUSH27: Opcode = _

source

pub const PUSH28: Opcode = _

source

pub const PUSH29: Opcode = _

source

pub const PUSH30: Opcode = _

source

pub const PUSH31: Opcode = _

source

pub const PUSH32: Opcode = _

source

pub const DUP1: Opcode = _

DUPn

source

pub const DUP2: Opcode = _

source

pub const DUP3: Opcode = _

source

pub const DUP4: Opcode = _

source

pub const DUP5: Opcode = _

source

pub const DUP6: Opcode = _

source

pub const DUP7: Opcode = _

source

pub const DUP8: Opcode = _

source

pub const DUP9: Opcode = _

source

pub const DUP10: Opcode = _

source

pub const DUP11: Opcode = _

source

pub const DUP12: Opcode = _

source

pub const DUP13: Opcode = _

source

pub const DUP14: Opcode = _

source

pub const DUP15: Opcode = _

source

pub const DUP16: Opcode = _

source

pub const SWAP1: Opcode = _

SWAPn

source

pub const SWAP2: Opcode = _

source

pub const SWAP3: Opcode = _

source

pub const SWAP4: Opcode = _

source

pub const SWAP5: Opcode = _

source

pub const SWAP6: Opcode = _

source

pub const SWAP7: Opcode = _

source

pub const SWAP8: Opcode = _

source

pub const SWAP9: Opcode = _

source

pub const SWAP10: Opcode = _

source

pub const SWAP11: Opcode = _

source

pub const SWAP12: Opcode = _

source

pub const SWAP13: Opcode = _

source

pub const SWAP14: Opcode = _

source

pub const SWAP15: Opcode = _

source

pub const SWAP16: Opcode = _

source

pub const RETURN: Opcode = _

RETURN

source

pub const REVERT: Opcode = _

REVERT

source

pub const INVALID: Opcode = _

INVALID

source

pub const EOFMAGIC: Opcode = _

source§

impl Opcode

source

pub const SHA3: Opcode = _

SHA3

source

pub const ADDRESS: Opcode = _

ADDRESS

source

pub const BALANCE: Opcode = _

BALANCE

source

pub const SELFBALANCE: Opcode = _

SELFBALANCE

source

pub const BASEFEE: Opcode = _

BASEFEE

source

pub const ORIGIN: Opcode = _

ORIGIN

source

pub const CALLER: Opcode = _

CALLER

source

pub const CALLVALUE: Opcode = _

CALLVALUE

source

pub const GASPRICE: Opcode = _

GASPRICE

source

pub const EXTCODESIZE: Opcode = _

EXTCODESIZE

source

pub const EXTCODECOPY: Opcode = _

EXTCODECOPY

source

pub const EXTCODEHASH: Opcode = _

EXTCODEHASH

source

pub const RETURNDATASIZE: Opcode = _

RETURNDATASIZE

source

pub const RETURNDATACOPY: Opcode = _

RETURNDATACOPY

source

pub const BLOCKHASH: Opcode = _

BLOCKHASH

source

pub const COINBASE: Opcode = _

COINBASE

source

pub const TIMESTAMP: Opcode = _

TIMESTAMP

source

pub const NUMBER: Opcode = _

NUMBER

source

pub const DIFFICULTY: Opcode = _

DIFFICULTY

source

pub const GASLIMIT: Opcode = _

GASLIMIT

source

pub const SLOAD: Opcode = _

SLOAD

source

pub const SSTORE: Opcode = _

SSTORE

source

pub const GAS: Opcode = _

GAS

source

pub const LOG0: Opcode = _

LOGn

source

pub const LOG1: Opcode = _

source

pub const LOG2: Opcode = _

source

pub const LOG3: Opcode = _

source

pub const LOG4: Opcode = _

source

pub const CREATE: Opcode = _

CREATE

source

pub const CREATE2: Opcode = _

CREATE2

source

pub const CALL: Opcode = _

CALL

source

pub const CALLCODE: Opcode = _

CALLCODE

source

pub const DELEGATECALL: Opcode = _

DELEGATECALL

source

pub const STATICCALL: Opcode = _

STATICCALL

source

pub const SUICIDE: Opcode = _

SUICIDE

source

pub const CHAINID: Opcode = _

CHAINID

source§

impl Opcode

source

pub fn is_push(&self) -> Option<u8>

Whether the opcode is a push opcode.

source

pub const fn as_u8(&self) -> u8

source

pub const fn as_usize(&self) -> usize

Trait Implementations§

source§

impl Clone for Opcode

source§

fn clone(&self) -> Opcode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Opcode

source§

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

Formats the value using the given formatter. Read more
source§

impl PartialEq for Opcode

source§

fn eq(&self, other: &Opcode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Opcode

source§

impl Eq for Opcode

source§

impl StructuralEq for Opcode

source§

impl StructuralPartialEq for Opcode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V