Enum Opcode

Source
#[repr(u8)]
pub enum Opcode {
Show 144 variants STOP = 0, ADD = 1, MUL = 2, SUB = 3, DIV = 4, SDIV = 5, MOD = 6, SMOD = 7, ADDMOD = 8, MULMOD = 9, EXP = 10, SIGNEXTEND = 11, LT = 16, GT = 17, SLT = 18, SGT = 19, EQ = 20, ISZERO = 21, AND = 22, OR = 23, XOR = 24, NOT = 25, BYTE = 26, SHL = 27, SHR = 28, SAR = 29, SHA3 = 32, ADDRESS = 48, BALANCE = 49, ORIGIN = 50, CALLER = 51, CALLVALUE = 52, CALLDATALOAD = 53, CALLDATASIZE = 54, CALLDATACOPY = 55, CODESIZE = 56, CODECOPY = 57, GASPRICE = 58, EXTCODESIZE = 59, EXTCODECOPY = 60, RETURNDATASIZE = 61, RETURNDATACOPY = 62, EXTCODEHASH = 63, BLOCKHASH = 64, COINBASE = 65, TIMESTAMP = 66, NUMBER = 67, DIFFICULTY = 68, GASLIMIT = 69, CHAINID = 70, SELFBALANCE = 71, BASEFEE = 72, POP = 80, MLOAD = 81, MSTORE = 82, MSTORE8 = 83, SLOAD = 84, SSTORE = 85, JUMP = 86, JUMPI = 87, PC = 88, MSIZE = 89, GAS = 90, JUMPDEST = 91, PUSH0 = 95, PUSH1 = 96, PUSH2 = 97, PUSH3 = 98, PUSH4 = 99, PUSH5 = 100, PUSH6 = 101, PUSH7 = 102, PUSH8 = 103, PUSH9 = 104, PUSH10 = 105, PUSH11 = 106, PUSH12 = 107, PUSH13 = 108, PUSH14 = 109, PUSH15 = 110, PUSH16 = 111, PUSH17 = 112, PUSH18 = 113, PUSH19 = 114, PUSH20 = 115, PUSH21 = 116, PUSH22 = 117, PUSH23 = 118, PUSH24 = 119, PUSH25 = 120, PUSH26 = 121, PUSH27 = 122, PUSH28 = 123, PUSH29 = 124, PUSH30 = 125, PUSH31 = 126, PUSH32 = 127, DUP1 = 128, DUP2 = 129, DUP3 = 130, DUP4 = 131, DUP5 = 132, DUP6 = 133, DUP7 = 134, DUP8 = 135, DUP9 = 136, DUP10 = 137, DUP11 = 138, DUP12 = 139, DUP13 = 140, DUP14 = 141, DUP15 = 142, DUP16 = 143, SWAP1 = 144, SWAP2 = 145, SWAP3 = 146, SWAP4 = 147, SWAP5 = 148, SWAP6 = 149, SWAP7 = 150, SWAP8 = 151, SWAP9 = 152, SWAP10 = 153, SWAP11 = 154, SWAP12 = 155, SWAP13 = 156, SWAP14 = 157, SWAP15 = 158, SWAP16 = 159, LOG0 = 160, LOG1 = 161, LOG2 = 162, LOG3 = 163, LOG4 = 164, CREATE = 240, CALL = 241, CALLCODE = 242, RETURN = 243, DELEGATECALL = 244, CREATE2 = 245, STATICCALL = 250, REVERT = 253, INVALID = 254, SELFDESTRUCT = 255,
}
Expand description

Variants§

§

STOP = 0

Opcode 0x0 - Halts execution

§

ADD = 1

Opcode 0x1 - Addition operation

§

MUL = 2

Opcode 0x2 - Multiplication operation

§

SUB = 3

Opcode 0x3 - Subtraction operation

§

DIV = 4

Opcode 0x4 - Integer division operation

§

SDIV = 5

Opcode 0x5 - Signed integer division operation (truncated)

§

MOD = 6

Opcode 0x6 - Modulo remainder operation

§

SMOD = 7

Opcode 0x7 - Signed modulo remainder operation

§

ADDMOD = 8

Opcode 0x8 - Modulo addition operation

§

MULMOD = 9

Opcode 0x9 - Modulo multiplication operation

§

EXP = 10

Opcode 0xA - Exponential operation

§

SIGNEXTEND = 11

Opcode 0xB - Extend length of two’s complement signed integer

§

LT = 16

Opcode 0x10 - Less-than comparison

§

GT = 17

Opcode 0x11 - Greater-than comparison

§

SLT = 18

Opcode 0x12 - Signed less-than comparison

§

SGT = 19

Opcode 0x13 - Signed greater-than comparison

§

EQ = 20

Opcode 0x14 - Equality comparison

§

ISZERO = 21

Opcode 0x15 - Simple not operator

§

AND = 22

Opcode 0x16 - Bitwise AND operation

§

OR = 23

Opcode 0x17 - Bitwise OR operation

§

XOR = 24

Opcode 0x18 - Bitwise XOR operation

§

NOT = 25

Opcode 0x19 - Bitwise NOT operation

§

BYTE = 26

Opcode 0x1A - Retrieve single byte from word

§

SHL = 27

Opcode 0x1B - Left shift operation

§

SHR = 28

Opcode 0x1C - Logical right shift operation

§

SAR = 29

Opcode 0x1D - Arithmetic (signed) right shift operation

§

SHA3 = 32

Opcode 0x20 - Compute Keccak-256 hash

§

ADDRESS = 48

Opcode 0x30 - Get address of currently executing account

§

BALANCE = 49

Opcode 0x31 - Get address of currently executing account

§

ORIGIN = 50

Opcode 0x32 - Get execution origination address

§

CALLER = 51

Opcode 0x33 - Get caller address

§

CALLVALUE = 52

Opcode 0x34 - Get deposited value by the instruction/transaction responsible for this execution

§

CALLDATALOAD = 53

Opcode 0x35 - Get input data of current environment

§

CALLDATASIZE = 54

Opcode 0x36 - Get size of input data in current environment

§

CALLDATACOPY = 55

Opcode 0x37 - Copy input data in current environment to memory

§

CODESIZE = 56

Opcode 0x38 - Get size of code running in current environment

§

CODECOPY = 57

Opcode 0x39 - Copy code running in current environment to memory

§

GASPRICE = 58

Opcode 0x3A - Get price of gas in current environment

§

EXTCODESIZE = 59

Opcode 0x3B - Get size of an account’s code

§

EXTCODECOPY = 60

Opcode 0x3C - Copy an account’s code to memory

§

RETURNDATASIZE = 61

Opcode 0x3D - Get size of output data from the previous call from the current environment

§

RETURNDATACOPY = 62

Opcode 0x3E - Copy output data from the previous call to memory

§

EXTCODEHASH = 63

Opcode 0x3F - Get hash of an account’s code

§

BLOCKHASH = 64

Opcode 0x40 - Get the hash of one of the 256 most recent complete blocks

§

COINBASE = 65

Opcode 0x41 - Get the block’s beneficiary address

§

TIMESTAMP = 66

Opcode 0x42 - Get the block’s timestamp

§

NUMBER = 67

Opcode 0x43 - Get the block’s number

§

DIFFICULTY = 68

Opcode 0x44 - Get the block’s difficulty

§

GASLIMIT = 69

Opcode 0x45 - Get the block’s gas limit

§

CHAINID = 70

Opcode 0x46 - Get the chain ID

§

SELFBALANCE = 71

Opcode 0x47 - Get balance of currently executing account

§

BASEFEE = 72

Opcode 0x48 - Get the base fee

§

POP = 80

Opcode 0x50 - Remove item from stack

§

MLOAD = 81

Opcode 0x51 - Load word from memory

§

MSTORE = 82

Opcode 0x52 - Save word to memory

§

MSTORE8 = 83

Opcode 0x53 - Save byte to memory

§

SLOAD = 84

Opcode 0x54 - Load word from storage

§

SSTORE = 85

Opcode 0x55 - Save word to storage

§

JUMP = 86

Opcode 0x56 - Alter the program counter

§

JUMPI = 87

Opcode 0x57 - Conditionally alter the program counter

§

PC = 88

Opcode 0x58 - Get the value of the program counter prior to the increment corresponding to this instruction

§

MSIZE = 89

Opcode 0x59 - Get the size of active memory in bytes

§

GAS = 90

Opcode 0x5A - Get the amount of available gas, including the corresponding reduction for the cost of this instruction

§

JUMPDEST = 91

Opcode 0x5B - Mark a valid destination for jumps

§

PUSH0 = 95

Opcode 0x5F - Place the constant value 0 on stack

§

PUSH1 = 96

Opcode 0x60 - Place 1 byte item on stack

§

PUSH2 = 97

Opcode 0x61 - Place 2 byte item on stack

§

PUSH3 = 98

Opcode 0x62 - Place 3 byte item on stack

§

PUSH4 = 99

Opcode 0x63 - Place 4 byte item on stack

§

PUSH5 = 100

Opcode 0x64 - Place 5 byte item on stack

§

PUSH6 = 101

Opcode 0x65 - Place 6 byte item on stack

§

PUSH7 = 102

Opcode 0x66 - Place 7 byte item on stack

§

PUSH8 = 103

Opcode 0x67 - Place 8 byte item on stack

§

PUSH9 = 104

Opcode 0x68 - Place 9 byte item on stack

§

PUSH10 = 105

Opcode 0x69 - Place 10 byte item on stack

§

PUSH11 = 106

Opcode 0x6A - Place 11 byte item on stack

§

PUSH12 = 107

Opcode 0x6B - Place 12 byte item on stack

§

PUSH13 = 108

Opcode 0x6C - Place 13 byte item on stack

§

PUSH14 = 109

Opcode 0x6D - Place 14 byte item on stack

§

PUSH15 = 110

Opcode 0x6E - Place 15 byte item on stack

§

PUSH16 = 111

Opcode 0x6F - Place 16 byte item on stack

§

PUSH17 = 112

Opcode 0x70 - Place 17 byte item on stack

§

PUSH18 = 113

Opcode 0x71 - Place 18 byte item on stack

§

PUSH19 = 114

Opcode 0x72 - Place 19 byte item on stack

§

PUSH20 = 115

Opcode 0x73 - Place 20 byte item on stack

§

PUSH21 = 116

Opcode 0x74 - Place 21 byte item on stack

§

PUSH22 = 117

Opcode 0x75 - Place 22 byte item on stack

§

PUSH23 = 118

Opcode 0x76 - Place 23 byte item on stack

§

PUSH24 = 119

Opcode 0x77 - Place 24 byte item on stack

§

PUSH25 = 120

Opcode 0x78 - Place 25 byte item on stack

§

PUSH26 = 121

Opcode 0x79 - Place 26 byte item on stack

§

PUSH27 = 122

Opcode 0x7A - Place 27 byte item on stack

§

PUSH28 = 123

Opcode 0x7B - Place 28 byte item on stack

§

PUSH29 = 124

Opcode 0x7C - Place 29 byte item on stack

§

PUSH30 = 125

Opcode 0x7D - Place 30 byte item on stack

§

PUSH31 = 126

Opcode 0x7E - Place 31 byte item on stack

§

PUSH32 = 127

Opcode 0x7F - Place 32 byte item on stack

§

DUP1 = 128

Opcode 0x80 - Duplicate 1st stack item

§

DUP2 = 129

Opcode 0x81 - Duplicate 2nd stack item

§

DUP3 = 130

Opcode 0x82 - Duplicate 3rd stack item

§

DUP4 = 131

Opcode 0x83 - Duplicate 4th stack item

§

DUP5 = 132

Opcode 0x84 - Duplicate 5th stack item

§

DUP6 = 133

Opcode 0x85 - Duplicate 6th stack item

§

DUP7 = 134

Opcode 0x86 - Duplicate 7th stack item

§

DUP8 = 135

Opcode 0x87 - Duplicate 8th stack item

§

DUP9 = 136

Opcode 0x88 - Duplicate 9th stack item

§

DUP10 = 137

Opcode 0x89 - Duplicate 10th stack item

§

DUP11 = 138

Opcode 0x8A - Duplicate 11th stack item

§

DUP12 = 139

Opcode 0x8B - Duplicate 12th stack item

§

DUP13 = 140

Opcode 0x8C - Duplicate 13th stack item

§

DUP14 = 141

Opcode 0x8D - Duplicate 14th stack item

§

DUP15 = 142

Opcode 0x8E - Duplicate 15th stack item

§

DUP16 = 143

Opcode 0x8F - Duplicate 16th stack item

§

SWAP1 = 144

Opcode 0x90 - Exchange 1st and 2nd stack items

§

SWAP2 = 145

Opcode 0x91 - Exchange 1st and 3rd stack items

§

SWAP3 = 146

Opcode 0x92 - Exchange 1st and 4th stack items

§

SWAP4 = 147

Opcode 0x93 - Exchange 1st and 5th stack items

§

SWAP5 = 148

Opcode 0x94 - Exchange 1st and 6th stack items

§

SWAP6 = 149

Opcode 0x95 - Exchange 1st and 7th stack items

§

SWAP7 = 150

Opcode 0x96 - Exchange 1st and 8th stack items

§

SWAP8 = 151

Opcode 0x97 - Exchange 1st and 9th stack items

§

SWAP9 = 152

Opcode 0x98 - Exchange 1st and 10th stack items

§

SWAP10 = 153

Opcode 0x99 - Exchange 1st and 11th stack items

§

SWAP11 = 154

Opcode 0x9A - Exchange 1st and 12th stack items

§

SWAP12 = 155

Opcode 0x9B - Exchange 1st and 13th stack items

§

SWAP13 = 156

Opcode 0x9C - Exchange 1st and 14th stack items

§

SWAP14 = 157

Opcode 0x9D - Exchange 1st and 15th stack items

§

SWAP15 = 158

Opcode 0x9E - Exchange 1st and 16th stack items

§

SWAP16 = 159

Opcode 0x9F - Exchange 1st and 17th stack items

§

LOG0 = 160

Opcode 0xA0 - Append log record with one topic

§

LOG1 = 161

Opcode 0xA1 - Append log record with two topics

§

LOG2 = 162

Opcode 0xA2 - Append log record with three topics

§

LOG3 = 163

Opcode 0xA3 - Append log record with four topics

§

LOG4 = 164

Opcode 0xA4 - Append log record with five topics

§

CREATE = 240

Opcode 0xF0 - Create a new account with associated code

§

CALL = 241

Opcode 0xF1 - Message-call into an account

§

CALLCODE = 242

Opcode 0xF2 - Message-call into this account with alternative account’s code

§

RETURN = 243

Opcode 0xF3 - Halt execution returning output data

§

DELEGATECALL = 244

Opcode 0xF4 - Message-call into this account with an alternative account’s code, but persisting the current values for sender and value

§

CREATE2 = 245

Opcode 0xF5 - Create a new account with associated code at a predictable address

§

STATICCALL = 250

Opcode 0xFA - Static message-call into an account

§

REVERT = 253

Opcode 0xFD - Halt execution reverting state changes but returning data and remaining gas

§

INVALID = 254

Opcode 0xFE - Designated invalid instruction

§

SELFDESTRUCT = 255

Opcode 0xFF - Halt execution and register account for later deletion

Trait Implementations§

Source§

impl AsRef<str> for Opcode

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
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<(), Error>

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

impl Default for Opcode

Source§

fn default() -> Opcode

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Opcode

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Opcode, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. 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 = 144usize

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, <Opcode 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>(&self, state: &mut __H)
where __H: Hasher,

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 IntoEnumIterator for Opcode

Source§

type Iterator = OpcodeIter

Source§

fn iter() -> OpcodeIter

Source§

impl Ord for Opcode

Source§

fn cmp(&self, other: &Opcode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. 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§

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 PartialOrd for Opcode

Source§

fn partial_cmp(&self, other: &Opcode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Opcode

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
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, <Opcode 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<Opcode, TryFromPrimitiveError<Opcode>>

Performs the conversion.
Source§

impl TryFromPrimitive for Opcode

Source§

impl VariantNames for Opcode

Source§

const VARIANTS: &'static [&'static str]

Names of the variants of this enum
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
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

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

Source§

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

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

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

Source§

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

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

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

impl<T> JsonSchemaMaybe for T