Sym

Enum Sym 

Source
pub enum Sym {
Show 60 variants Const(Box<[u8; 32]>), Var(Var), Add, Mul, Sub, Div, SDiv, Mod, SMod, AddMod, MulMod, Exp, Lt, Gt, SLt, SGt, Eq, And, Or, Xor, Byte, Shl, Shr, Sar, Keccak256, SignExtend, IsZero, Not, CallDataLoad, ExtCodeSize, ExtCodeHash, MLoad, SLoad, Balance, BlockHash, Address, Origin, Caller, CallValue, CallDataSize, CodeSize, GasPrice, ReturnDataSize, Coinbase, Timestamp, Number, Difficulty, GasLimit, ChainId, SelfBalance, BaseFee, GetPc(u16), MSize, Gas, Create, Create2, CallCode, Call, StaticCall, DelegateCall,
}
Expand description

A node in the tree representation of an Expr.

For example, the expression 2 + 3 would be represented as something like [Sym::Add, Sym::Const(2), Sym::Const(3)].

Variants§

§

Const(Box<[u8; 32]>)

A constant value.

§

Var(Var)

A variable value.

§

Add

An add (0x01) operation.

§

Mul

A mul (0x02) operation.

§

Sub

A sub (0x03) operation.

§

Div

A div (0x04) operation.

§

SDiv

A sdiv (0x05) operation.

§

Mod

A mod (0x06) operation.

§

SMod

A smod (0x07) operation.

§

AddMod

A addmod (0x08) operation.

§

MulMod

A mulmod (0x09) operation.

§

Exp

An exp (0x0a) operation.

§

Lt

An lt (0x10) operation.

§

Gt

A gt (0x11) operation.

§

SLt

An slt (0x12) operation.

§

SGt

An sgt (0x13) operation.

§

Eq

An eq (0x14) operation.

§

And

An and (0x16) operation.

§

Or

An or (0x17) operation.

§

Xor

A xor (0x18) operation.

§

Byte

A byte (0x1a) operation.

§

Shl

A shl (0x1b) operation.

§

Shr

A shr (0x1c) operation.

§

Sar

A sar (0x1d) operation.

§

Keccak256

A keccak256 (0x20) operation.

§

SignExtend

A signextend (0x0b) operation.

§

IsZero

An iszero (0x15) operation.

§

Not

A not (0x18) operation.

§

CallDataLoad

A calldataload (0x35) operation.

§

ExtCodeSize

An extcodesize (0x3b) operation.

§

ExtCodeHash

An extcodehash (0x3f) operation.

§

MLoad

An mload (0x51) operation.

§

SLoad

An sload (0x54) operation.

§

Balance

A balance (0x31) operation.

§

BlockHash

A blockhash (0x40) operation.

§

Address

An address (0x30) operation.

§

Origin

An origin (0x32) operation.

§

Caller

A caller (0x33) operation.

§

CallValue

A callvalue (0x34) operation.

§

CallDataSize

A calldatasize (0x36) operation.

§

CodeSize

A codesize (0x38) operation.

§

GasPrice

A gasprice (0x3a) operation.

§

ReturnDataSize

A returndatasize (0x3d) operation.

§

Coinbase

A coinbase (0x41) operation.

§

Timestamp

A timestamp (0x42) operation.

§

Number

A number (0x43) operation.

§

Difficulty

A difficulty (0x44) operation.

§

GasLimit

A gaslimit (0x45) operation.

§

ChainId

A chainid (0x46) operation.

§

SelfBalance

A selfbalance (0x47) operation.

§

BaseFee

A basefee (0x48) operation.

§

GetPc(u16)

A pc (0x58) operation.

§

MSize

An msize (0x59) operation.

§

Gas

A gas (0x5a) operation.

§

Create

A create (0xf0) operation.

§

Create2

A create2 (0xf5) operation.

§

CallCode

A callcode (0xf2) operation.

§

Call

A call (0xf1) operation.

§

StaticCall

A staticcall (0xfa) operation.

§

DelegateCall

A delegatecall (0xf4) operation.

Trait Implementations§

Source§

impl Clone for Sym

Source§

fn clone(&self) -> Sym

Returns a duplicate 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 Sym

Source§

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

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

impl Hash for Sym

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Sym

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Sym

Source§

impl StructuralPartialEq for Sym

Auto Trait Implementations§

§

impl Freeze for Sym

§

impl RefUnwindSafe for Sym

§

impl Send for Sym

§

impl Sync for Sym

§

impl Unpin for Sym

§

impl UnwindSafe for Sym

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V