Enum OpCode

Source
#[repr(u8)]
pub enum OpCode {
Show 196 variants PushInt8 = 0, PushInt16 = 1, PushInt32 = 2, PushInt64 = 3, PushInt128 = 4, PushInt256 = 5, PushTrue = 8, PushFalse = 9, PushA = 10, PushNull = 11, PushData1 = 12, PushData2 = 13, PushData4 = 14, PushM1 = 15, Push0 = 16, Push1 = 17, Push2 = 18, Push3 = 19, Push4 = 20, Push5 = 21, Push6 = 22, Push7 = 23, Push8 = 24, Push9 = 25, Push10 = 26, Push11 = 27, Push12 = 28, Push13 = 29, Push14 = 30, Push15 = 31, Push16 = 32, Nop = 33, Jmp = 34, JmpL = 35, JmpIf = 36, JmpIfL = 37, JmpIfNot = 38, JmpIfNotL = 39, JmpEq = 40, JmpEqL = 41, JmpNe = 42, JmpNeL = 43, JmpGt = 44, JmpGtL = 45, JmpGe = 46, JmpGeL = 47, JmpLt = 48, JmpLtL = 49, JmpLe = 50, JmpLeL = 51, Call = 52, CallL = 53, CallA = 54, CallT = 55, Abort = 56, Assert = 57, Throw = 58, Try = 59, TryL = 60, EndTry = 61, EndTryL = 62, EndFinally = 63, Ret = 64, Syscall = 65, Depth = 67, Drop = 69, Nip = 70, Xdrop = 72, Clear = 73, Dup = 74, Over = 75, Pick = 77, Tuck = 78, Swap = 80, Rot = 81, Roll = 82, Reverse3 = 83, Reverse4 = 84, ReverseN = 85, InitSSLot = 86, InitSlot = 87, LdSFLd0 = 88, LdSFLd1 = 89, LdSFLd2 = 90, LdSFLd3 = 91, LdSFLd4 = 92, LdSFLd5 = 93, LdSFLd6 = 94, LdSFLd = 95, StSFLd0 = 96, StSFLd1 = 97, StSFLd2 = 98, StSFLd3 = 99, StSFLd4 = 100, StSFLd5 = 101, StSFLd6 = 102, StSFLd = 103, LdLoc0 = 104, LdLoc1 = 105, LdLoc2 = 106, LdLoc3 = 107, LdLoc4 = 108, LdLoc5 = 109, LdLoc6 = 110, LdLoc = 111, StLoc0 = 112, StLoc1 = 113, StLoc2 = 114, StLoc3 = 115, StLoc4 = 116, StLoc5 = 117, StLoc6 = 118, StLoc = 119, LdArg0 = 120, LdArg1 = 121, LdArg2 = 122, LdArg3 = 123, LdArg4 = 124, LdArg5 = 125, LdArg6 = 126, LdArg = 127, StArg0 = 128, StArg1 = 129, StArg2 = 130, StArg3 = 131, StArg4 = 132, StArg5 = 133, StArg6 = 134, StArg = 135, NewBuffer = 136, MemCpy = 137, Cat = 139, Substr = 140, Left = 141, Right = 142, Invert = 144, And = 145, Or = 146, Xor = 147, Equal = 151, NotEqual = 152, Sign = 153, Abs = 154, Negate = 155, Inc = 156, Dec = 157, Add = 158, Sub = 159, Mul = 160, Div = 161, Mod = 162, Pow = 163, Sqrt = 164, ModMul = 165, ModPow = 166, Shl = 168, Shr = 169, Not = 170, BoolAnd = 171, BoolOr = 172, Nz = 177, NumEqual = 179, NumNotEqual = 180, Lt = 181, Le = 182, Gt = 183, Ge = 184, Min = 185, Max = 186, Within = 187, PackMap = 190, PackStruct = 191, Pack = 192, Unpack = 193, NewArray0 = 194, NewArray = 195, NewArrayT = 196, NewStruct0 = 197, NewStruct = 198, NewMap = 200, Size = 202, HasKey = 203, Keys = 204, Values = 205, PickItem = 206, Append = 207, SetItem = 208, ReverseItems = 209, Remove = 210, ClearItems = 211, PopItem = 212, IsNull = 216, IsType = 217, Convert = 219, AbortMsg = 224, AssertMsg = 225,
}

Variants§

§

PushInt8 = 0

§

PushInt16 = 1

§

PushInt32 = 2

§

PushInt64 = 3

§

PushInt128 = 4

§

PushInt256 = 5

§

PushTrue = 8

§

PushFalse = 9

§

PushA = 10

§

PushNull = 11

§

PushData1 = 12

§

PushData2 = 13

§

PushData4 = 14

§

PushM1 = 15

§

Push0 = 16

§

Push1 = 17

§

Push2 = 18

§

Push3 = 19

§

Push4 = 20

§

Push5 = 21

§

Push6 = 22

§

Push7 = 23

§

Push8 = 24

§

Push9 = 25

§

Push10 = 26

§

Push11 = 27

§

Push12 = 28

§

Push13 = 29

§

Push14 = 30

§

Push15 = 31

§

Push16 = 32

§

Nop = 33

§

Jmp = 34

§

JmpL = 35

§

JmpIf = 36

§

JmpIfL = 37

§

JmpIfNot = 38

§

JmpIfNotL = 39

§

JmpEq = 40

§

JmpEqL = 41

§

JmpNe = 42

§

JmpNeL = 43

§

JmpGt = 44

§

JmpGtL = 45

§

JmpGe = 46

§

JmpGeL = 47

§

JmpLt = 48

§

JmpLtL = 49

§

JmpLe = 50

§

JmpLeL = 51

§

Call = 52

§

CallL = 53

§

CallA = 54

§

CallT = 55

§

Abort = 56

§

Assert = 57

§

Throw = 58

§

Try = 59

§

TryL = 60

§

EndTry = 61

§

EndTryL = 62

§

EndFinally = 63

§

Ret = 64

§

Syscall = 65

§

Depth = 67

§

Drop = 69

§

Nip = 70

§

Xdrop = 72

§

Clear = 73

§

Dup = 74

§

Over = 75

§

Pick = 77

§

Tuck = 78

§

Swap = 80

§

Rot = 81

§

Roll = 82

§

Reverse3 = 83

§

Reverse4 = 84

§

ReverseN = 85

§

InitSSLot = 86

§

InitSlot = 87

§

LdSFLd0 = 88

§

LdSFLd1 = 89

§

LdSFLd2 = 90

§

LdSFLd3 = 91

§

LdSFLd4 = 92

§

LdSFLd5 = 93

§

LdSFLd6 = 94

§

LdSFLd = 95

§

StSFLd0 = 96

§

StSFLd1 = 97

§

StSFLd2 = 98

§

StSFLd3 = 99

§

StSFLd4 = 100

§

StSFLd5 = 101

§

StSFLd6 = 102

§

StSFLd = 103

§

LdLoc0 = 104

§

LdLoc1 = 105

§

LdLoc2 = 106

§

LdLoc3 = 107

§

LdLoc4 = 108

§

LdLoc5 = 109

§

LdLoc6 = 110

§

LdLoc = 111

§

StLoc0 = 112

§

StLoc1 = 113

§

StLoc2 = 114

§

StLoc3 = 115

§

StLoc4 = 116

§

StLoc5 = 117

§

StLoc6 = 118

§

StLoc = 119

§

LdArg0 = 120

§

LdArg1 = 121

§

LdArg2 = 122

§

LdArg3 = 123

§

LdArg4 = 124

§

LdArg5 = 125

§

LdArg6 = 126

§

LdArg = 127

§

StArg0 = 128

§

StArg1 = 129

§

StArg2 = 130

§

StArg3 = 131

§

StArg4 = 132

§

StArg5 = 133

§

StArg6 = 134

§

StArg = 135

§

NewBuffer = 136

§

MemCpy = 137

§

Cat = 139

§

Substr = 140

§

Left = 141

§

Right = 142

§

Invert = 144

§

And = 145

§

Or = 146

§

Xor = 147

§

Equal = 151

§

NotEqual = 152

§

Sign = 153

§

Abs = 154

§

Negate = 155

§

Inc = 156

§

Dec = 157

§

Add = 158

§

Sub = 159

§

Mul = 160

§

Div = 161

§

Mod = 162

§

Pow = 163

§

Sqrt = 164

§

ModMul = 165

§

ModPow = 166

§

Shl = 168

§

Shr = 169

§

Not = 170

§

BoolAnd = 171

§

BoolOr = 172

§

Nz = 177

§

NumEqual = 179

§

NumNotEqual = 180

§

Lt = 181

§

Le = 182

§

Gt = 183

§

Ge = 184

§

Min = 185

§

Max = 186

§

Within = 187

§

PackMap = 190

§

PackStruct = 191

§

Pack = 192

§

Unpack = 193

§

NewArray0 = 194

§

NewArray = 195

§

NewArrayT = 196

§

NewStruct0 = 197

§

NewStruct = 198

§

NewMap = 200

§

Size = 202

§

HasKey = 203

§

Keys = 204

§

Values = 205

§

PickItem = 206

§

Append = 207

§

SetItem = 208

§

ReverseItems = 209

§

Remove = 210

§

ClearItems = 211

§

PopItem = 212

§

IsNull = 216

§

IsType = 217

§

Convert = 219

§

AbortMsg = 224

§

AssertMsg = 225

Implementations§

Source§

impl OpCode

Source

pub fn price(self) -> u32

Source

pub fn opcode(self) -> u8

Source

pub fn to_hex_string(self) -> String

Source

pub fn operand_size(self) -> Option<OperandSize>

Trait Implementations§

Source§

impl Clone for OpCode

Source§

fn clone(&self) -> OpCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

const 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 Display for OpCode

Source§

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

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

impl EnumCount for OpCode

Source§

const COUNT: usize = 196usize

Source§

impl FromStr for OpCode

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<OpCode, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for OpCode

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 OpCode

Source§

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

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

const 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 TryFrom<&str> for OpCode

Source§

type Error = ParseError

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

fn try_from(s: &str) -> Result<OpCode, <Self as TryFrom<&str>>::Error>

Performs the conversion.
Source§

impl TryFrom<u8> for OpCode

Source§

type Error = TryFromPrimitiveError<OpCode>

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

fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for OpCode

Source§

const NAME: &'static str = "OpCode"

Source§

type Primitive = u8

Source§

type Error = TryFromPrimitiveError<OpCode>

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Source§

impl Copy for OpCode

Source§

impl Eq for OpCode

Source§

impl StructuralPartialEq for OpCode

Auto Trait Implementations§

§

impl Freeze for OpCode

§

impl RefUnwindSafe for OpCode

§

impl Send for OpCode

§

impl Sync for OpCode

§

impl Unpin for OpCode

§

impl UnwindSafe for OpCode

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> ToStringFallible for T
where T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

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

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,