fuel_asm

Enum Instruction

source
pub enum Instruction {
Show 111 variants ADD(ADD), AND(AND), DIV(DIV), EQ(EQ), EXP(EXP), GT(GT), LT(LT), MLOG(MLOG), MROO(MROO), MOD(MOD), MOVE(MOVE), MUL(MUL), NOT(NOT), OR(OR), SLL(SLL), SRL(SRL), SUB(SUB), XOR(XOR), MLDV(MLDV), RET(RET), RETD(RETD), ALOC(ALOC), MCL(MCL), MCP(MCP), MEQ(MEQ), BHSH(BHSH), BHEI(BHEI), BURN(BURN), CALL(CALL), CCP(CCP), CROO(CROO), CSIZ(CSIZ), CB(CB), LDC(LDC), LOG(LOG), LOGD(LOGD), MINT(MINT), RVRT(RVRT), SCWQ(SCWQ), SRW(SRW), SRWQ(SRWQ), SWW(SWW), SWWQ(SWWQ), TR(TR), TRO(TRO), ECK1(ECK1), ECR1(ECR1), ED19(ED19), K256(K256), S256(S256), TIME(TIME), NOOP(NOOP), FLAG(FLAG), BAL(BAL), JMP(JMP), JNE(JNE), SMO(SMO), ADDI(ADDI), ANDI(ANDI), DIVI(DIVI), EXPI(EXPI), MODI(MODI), MULI(MULI), ORI(ORI), SLLI(SLLI), SRLI(SRLI), SUBI(SUBI), XORI(XORI), JNEI(JNEI), LB(LB), LW(LW), SB(SB), SW(SW), MCPI(MCPI), GTF(GTF), MCLI(MCLI), GM(GM), MOVI(MOVI), JNZI(JNZI), JMPF(JMPF), JMPB(JMPB), JNZF(JNZF), JNZB(JNZB), JNEF(JNEF), JNEB(JNEB), JI(JI), CFEI(CFEI), CFSI(CFSI), CFE(CFE), CFS(CFS), PSHL(PSHL), PSHH(PSHH), POPL(POPL), POPH(POPH), WDCM(WDCM), WQCM(WQCM), WDOP(WDOP), WQOP(WQOP), WDML(WDML), WQML(WQML), WDDV(WDDV), WQDV(WQDV), WDMD(WDMD), WQMD(WQMD), WDAM(WDAM), WQAM(WQAM), WDMM(WDMM), WQMM(WQMM), ECAL(ECAL), BSIZ(BSIZ), BLDD(BLDD),
}
Expand description

Representation of a single instruction for the interpreter.

The opcode is represented in the tag (variant), or may be retrieved in the form of an Opcode byte using the opcode method.

The register and immediate data associated with the instruction is represented within an inner unit type wrapper around the 3 remaining bytes.

Variants§

§

ADD(ADD)

Adds two registers.

§

AND(AND)

Bitwise ANDs two registers.

§

DIV(DIV)

Divides two registers.

§

EQ(EQ)

Compares two registers for equality.

§

EXP(EXP)

Raises one register to the power of another.

§

GT(GT)

Compares two registers for greater-than.

§

LT(LT)

Compares two registers for less-than.

§

MLOG(MLOG)

The integer logarithm of a register.

§

MROO(MROO)

The integer root of a register.

§

MOD(MOD)

Modulo remainder of two registers.

§

MOVE(MOVE)

Copy from one register to another.

§

MUL(MUL)

Multiplies two registers.

§

NOT(NOT)

Bitwise NOT a register.

§

OR(OR)

Bitwise ORs two registers.

§

SLL(SLL)

Left shifts a register by a register.

§

SRL(SRL)

Right shifts a register by a register.

§

SUB(SUB)

Subtracts two registers.

§

XOR(XOR)

Bitwise XORs two registers.

§

MLDV(MLDV)

Fused multiply-divide with arbitrary precision intermediate step.

§

RET(RET)

Return from context.

§

RETD(RETD)

Return from context with data.

§

ALOC(ALOC)

Allocate a number of bytes from the heap.

§

MCL(MCL)

Clear a variable number of bytes in memory.

§

MCP(MCP)

Copy a variable number of bytes in memory.

§

MEQ(MEQ)

Compare bytes in memory.

§

BHSH(BHSH)

Get block header hash for height.

§

BHEI(BHEI)

Get current block height.

§

BURN(BURN)

Burns amount coins of the asset ID created from sub_id for the current contract.

§

CALL(CALL)

Call a contract.

§

CCP(CCP)

Copy contract code for a contract.

§

CROO(CROO)

Get code root of a contract.

§

CSIZ(CSIZ)

Get code size of a contract.

§

CB(CB)

Get current block proposer’s address.

§

LDC(LDC)

Load code as executable either from contract, blob, or memory.

§

LOG(LOG)

Log an event.

§

LOGD(LOGD)

Log data.

§

MINT(MINT)

Mints amount coins of the asset ID created from sub_id for the current contract.

§

RVRT(RVRT)

Halt execution, reverting state changes and returning a value.

§

SCWQ(SCWQ)

Clear a series of slots from contract storage.

§

SRW(SRW)

Load a word from contract storage.

§

SRWQ(SRWQ)

Load a series of 32 byte slots from contract storage.

§

SWW(SWW)

Store a word in contract storage.

§

SWWQ(SWWQ)

Store a series of 32 byte slots in contract storage.

§

TR(TR)

Transfer coins to a contract unconditionally.

§

TRO(TRO)

Transfer coins to a variable output.

§

ECK1(ECK1)

The 64-byte public key (x, y) recovered from 64-byte signature on 32-byte message hash.

§

ECR1(ECR1)

The 64-byte Secp256r1 public key (x, y) recovered from 64-byte signature on 32-byte message hash.

§

ED19(ED19)

Verify ED25519 public key and signature match a message.

§

K256(K256)

The keccak-256 hash of a slice.

§

S256(S256)

The SHA-2-256 hash of a slice.

§

TIME(TIME)

Get timestamp of block at given height.

§

NOOP(NOOP)

Performs no operation.

§

FLAG(FLAG)

Set flag register to a register.

§

BAL(BAL)

Get the balance of contract of an asset ID.

§

JMP(JMP)

Dynamic jump.

§

JNE(JNE)

Conditional dynamic jump.

§

SMO(SMO)

Send a message to recipient address with call abi, coins, and output.

§

ADDI(ADDI)

Adds a register and an immediate value.

§

ANDI(ANDI)

Bitwise ANDs a register and an immediate value.

§

DIVI(DIVI)

Divides a register and an immediate value.

§

EXPI(EXPI)

Raises one register to the power of an immediate value.

§

MODI(MODI)

Modulo remainder of a register and an immediate value.

§

MULI(MULI)

Multiplies a register and an immediate value.

§

ORI(ORI)

Bitwise ORs a register and an immediate value.

§

SLLI(SLLI)

Left shifts a register by an immediate value.

§

SRLI(SRLI)

Right shifts a register by an immediate value.

§

SUBI(SUBI)

Subtracts a register and an immediate value.

§

XORI(XORI)

Bitwise XORs a register and an immediate value.

§

JNEI(JNEI)

Conditional jump.

§

LB(LB)

A byte is loaded from the specified address offset by an immediate value.

§

LW(LW)

A word is loaded from the specified address offset by an immediate value.

§

SB(SB)

Write the least significant byte of a register to memory.

§

SW(SW)

Write a register to memory.

§

MCPI(MCPI)

Copy an immediate number of bytes in memory.

§

GTF(GTF)

Get transaction fields.

§

MCLI(MCLI)

Clear an immediate number of bytes in memory.

§

GM(GM)

Get metadata from memory.

§

MOVI(MOVI)

Copy immediate value into a register

§

JNZI(JNZI)

Conditional jump against zero.

§

JMPF(JMPF)

Unconditional dynamic relative jump forwards, with a constant offset.

§

JMPB(JMPB)

Unconditional dynamic relative jump backwards, with a constant offset.

§

JNZF(JNZF)

Dynamic relative jump forwards, conditional against zero, with a constant offset.

§

JNZB(JNZB)

Dynamic relative jump backwards, conditional against zero, with a constant offset.

§

JNEF(JNEF)

Dynamic relative jump forwards, conditional on comparsion, with a constant offset.

§

JNEB(JNEB)

Dynamic relative jump backwards, conditional on comparsion, with a constant offset.

§

JI(JI)

Jump.

§

CFEI(CFEI)

Extend the current call frame’s stack by an immediate value.

§

CFSI(CFSI)

Shrink the current call frame’s stack by an immediate value.

§

CFE(CFE)

Extend the current call frame’s stack

§

CFS(CFS)

Shrink the current call frame’s stack

§

PSHL(PSHL)

Push a bitmask-selected set of registers in range 16..40 to the stack.

§

PSHH(PSHH)

Push a bitmask-selected set of registers in range 40..64 to the stack.

§

POPL(POPL)

Pop a bitmask-selected set of registers in range 16..40 to the stack.

§

POPH(POPH)

Pop a bitmask-selected set of registers in range 40..64 to the stack.

§

WDCM(WDCM)

Compare 128bit integers

§

WQCM(WQCM)

Compare 256bit integers

§

WDOP(WDOP)

Simple 128bit operations

§

WQOP(WQOP)

Simple 256bit operations

§

WDML(WDML)

Multiply 128bit

§

WQML(WQML)

Multiply 256bit

§

WDDV(WDDV)

Divide 128bit

§

WQDV(WQDV)

Divide 256bit

§

WDMD(WDMD)

Fused multiply-divide 128bit

§

WQMD(WQMD)

Fused multiply-divide 256bit

§

WDAM(WDAM)

AddMod 128bit

§

WQAM(WQAM)

AddMod 256bit

§

WDMM(WDMM)

MulMod 128bit

§

WQMM(WQMM)

MulMod 256bit

§

ECAL(ECAL)

Call external function

§

BSIZ(BSIZ)

Get blob size

§

BLDD(BLDD)

Load blob as data

Implementations§

source§

impl Instruction

source

pub fn opcode(&self) -> Opcode

This instruction’s opcode.

source

pub fn reg_ids(&self) -> [Option<RegId>; 4]

Unpacks all register IDs into a slice of options.

source§

impl Instruction

source

pub const SIZE: usize = 4usize

Size of an instruction in bytes

source

pub fn to_bytes(self) -> [u8; 4]

Convenience method for converting to bytes

Trait Implementations§

source§

impl Clone for Instruction

source§

fn clone(&self) -> Instruction

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 Instruction

source§

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

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

impl<'de> Deserialize<'de> for Instruction

source§

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

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<ADD> for Instruction

source§

fn from(op: ADD) -> Self

Converts to this type from the input type.
source§

impl From<ADDI> for Instruction

source§

fn from(op: ADDI) -> Self

Converts to this type from the input type.
source§

impl From<ALOC> for Instruction

source§

fn from(op: ALOC) -> Self

Converts to this type from the input type.
source§

impl From<AND> for Instruction

source§

fn from(op: AND) -> Self

Converts to this type from the input type.
source§

impl From<ANDI> for Instruction

source§

fn from(op: ANDI) -> Self

Converts to this type from the input type.
source§

impl From<BAL> for Instruction

source§

fn from(op: BAL) -> Self

Converts to this type from the input type.
source§

impl From<BHEI> for Instruction

source§

fn from(op: BHEI) -> Self

Converts to this type from the input type.
source§

impl From<BHSH> for Instruction

source§

fn from(op: BHSH) -> Self

Converts to this type from the input type.
source§

impl From<BLDD> for Instruction

source§

fn from(op: BLDD) -> Self

Converts to this type from the input type.
source§

impl From<BSIZ> for Instruction

source§

fn from(op: BSIZ) -> Self

Converts to this type from the input type.
source§

impl From<BURN> for Instruction

source§

fn from(op: BURN) -> Self

Converts to this type from the input type.
source§

impl From<CALL> for Instruction

source§

fn from(op: CALL) -> Self

Converts to this type from the input type.
source§

impl From<CB> for Instruction

source§

fn from(op: CB) -> Self

Converts to this type from the input type.
source§

impl From<CCP> for Instruction

source§

fn from(op: CCP) -> Self

Converts to this type from the input type.
source§

impl From<CFE> for Instruction

source§

fn from(op: CFE) -> Self

Converts to this type from the input type.
source§

impl From<CFEI> for Instruction

source§

fn from(op: CFEI) -> Self

Converts to this type from the input type.
source§

impl From<CFS> for Instruction

source§

fn from(op: CFS) -> Self

Converts to this type from the input type.
source§

impl From<CFSI> for Instruction

source§

fn from(op: CFSI) -> Self

Converts to this type from the input type.
source§

impl From<CROO> for Instruction

source§

fn from(op: CROO) -> Self

Converts to this type from the input type.
source§

impl From<CSIZ> for Instruction

source§

fn from(op: CSIZ) -> Self

Converts to this type from the input type.
source§

impl From<DIV> for Instruction

source§

fn from(op: DIV) -> Self

Converts to this type from the input type.
source§

impl From<DIVI> for Instruction

source§

fn from(op: DIVI) -> Self

Converts to this type from the input type.
source§

impl From<ECAL> for Instruction

source§

fn from(op: ECAL) -> Self

Converts to this type from the input type.
source§

impl From<ECK1> for Instruction

source§

fn from(op: ECK1) -> Self

Converts to this type from the input type.
source§

impl From<ECR1> for Instruction

source§

fn from(op: ECR1) -> Self

Converts to this type from the input type.
source§

impl From<ED19> for Instruction

source§

fn from(op: ED19) -> Self

Converts to this type from the input type.
source§

impl From<EQ> for Instruction

source§

fn from(op: EQ) -> Self

Converts to this type from the input type.
source§

impl From<EXP> for Instruction

source§

fn from(op: EXP) -> Self

Converts to this type from the input type.
source§

impl From<EXPI> for Instruction

source§

fn from(op: EXPI) -> Self

Converts to this type from the input type.
source§

impl From<FLAG> for Instruction

source§

fn from(op: FLAG) -> Self

Converts to this type from the input type.
source§

impl From<GM> for Instruction

source§

fn from(op: GM) -> Self

Converts to this type from the input type.
source§

impl From<GT> for Instruction

source§

fn from(op: GT) -> Self

Converts to this type from the input type.
source§

impl From<GTF> for Instruction

source§

fn from(op: GTF) -> Self

Converts to this type from the input type.
source§

impl From<Instruction> for [u8; 4]

source§

fn from(inst: Instruction) -> Self

Converts to this type from the input type.
source§

impl From<Instruction> for RawInstruction

source§

fn from(inst: Instruction) -> Self

Converts to this type from the input type.
source§

impl From<JI> for Instruction

source§

fn from(op: JI) -> Self

Converts to this type from the input type.
source§

impl From<JMP> for Instruction

source§

fn from(op: JMP) -> Self

Converts to this type from the input type.
source§

impl From<JMPB> for Instruction

source§

fn from(op: JMPB) -> Self

Converts to this type from the input type.
source§

impl From<JMPF> for Instruction

source§

fn from(op: JMPF) -> Self

Converts to this type from the input type.
source§

impl From<JNE> for Instruction

source§

fn from(op: JNE) -> Self

Converts to this type from the input type.
source§

impl From<JNEB> for Instruction

source§

fn from(op: JNEB) -> Self

Converts to this type from the input type.
source§

impl From<JNEF> for Instruction

source§

fn from(op: JNEF) -> Self

Converts to this type from the input type.
source§

impl From<JNEI> for Instruction

source§

fn from(op: JNEI) -> Self

Converts to this type from the input type.
source§

impl From<JNZB> for Instruction

source§

fn from(op: JNZB) -> Self

Converts to this type from the input type.
source§

impl From<JNZF> for Instruction

source§

fn from(op: JNZF) -> Self

Converts to this type from the input type.
source§

impl From<JNZI> for Instruction

source§

fn from(op: JNZI) -> Self

Converts to this type from the input type.
source§

impl From<K256> for Instruction

source§

fn from(op: K256) -> Self

Converts to this type from the input type.
source§

impl From<LB> for Instruction

source§

fn from(op: LB) -> Self

Converts to this type from the input type.
source§

impl From<LDC> for Instruction

source§

fn from(op: LDC) -> Self

Converts to this type from the input type.
source§

impl From<LOG> for Instruction

source§

fn from(op: LOG) -> Self

Converts to this type from the input type.
source§

impl From<LOGD> for Instruction

source§

fn from(op: LOGD) -> Self

Converts to this type from the input type.
source§

impl From<LT> for Instruction

source§

fn from(op: LT) -> Self

Converts to this type from the input type.
source§

impl From<LW> for Instruction

source§

fn from(op: LW) -> Self

Converts to this type from the input type.
source§

impl From<MCL> for Instruction

source§

fn from(op: MCL) -> Self

Converts to this type from the input type.
source§

impl From<MCLI> for Instruction

source§

fn from(op: MCLI) -> Self

Converts to this type from the input type.
source§

impl From<MCP> for Instruction

source§

fn from(op: MCP) -> Self

Converts to this type from the input type.
source§

impl From<MCPI> for Instruction

source§

fn from(op: MCPI) -> Self

Converts to this type from the input type.
source§

impl From<MEQ> for Instruction

source§

fn from(op: MEQ) -> Self

Converts to this type from the input type.
source§

impl From<MINT> for Instruction

source§

fn from(op: MINT) -> Self

Converts to this type from the input type.
source§

impl From<MLDV> for Instruction

source§

fn from(op: MLDV) -> Self

Converts to this type from the input type.
source§

impl From<MLOG> for Instruction

source§

fn from(op: MLOG) -> Self

Converts to this type from the input type.
source§

impl From<MOD> for Instruction

source§

fn from(op: MOD) -> Self

Converts to this type from the input type.
source§

impl From<MODI> for Instruction

source§

fn from(op: MODI) -> Self

Converts to this type from the input type.
source§

impl From<MOVE> for Instruction

source§

fn from(op: MOVE) -> Self

Converts to this type from the input type.
source§

impl From<MOVI> for Instruction

source§

fn from(op: MOVI) -> Self

Converts to this type from the input type.
source§

impl From<MROO> for Instruction

source§

fn from(op: MROO) -> Self

Converts to this type from the input type.
source§

impl From<MUL> for Instruction

source§

fn from(op: MUL) -> Self

Converts to this type from the input type.
source§

impl From<MULI> for Instruction

source§

fn from(op: MULI) -> Self

Converts to this type from the input type.
source§

impl From<NOOP> for Instruction

source§

fn from(op: NOOP) -> Self

Converts to this type from the input type.
source§

impl From<NOT> for Instruction

source§

fn from(op: NOT) -> Self

Converts to this type from the input type.
source§

impl From<OR> for Instruction

source§

fn from(op: OR) -> Self

Converts to this type from the input type.
source§

impl From<ORI> for Instruction

source§

fn from(op: ORI) -> Self

Converts to this type from the input type.
source§

impl From<POPH> for Instruction

source§

fn from(op: POPH) -> Self

Converts to this type from the input type.
source§

impl From<POPL> for Instruction

source§

fn from(op: POPL) -> Self

Converts to this type from the input type.
source§

impl From<PSHH> for Instruction

source§

fn from(op: PSHH) -> Self

Converts to this type from the input type.
source§

impl From<PSHL> for Instruction

source§

fn from(op: PSHL) -> Self

Converts to this type from the input type.
source§

impl From<RET> for Instruction

source§

fn from(op: RET) -> Self

Converts to this type from the input type.
source§

impl From<RETD> for Instruction

source§

fn from(op: RETD) -> Self

Converts to this type from the input type.
source§

impl From<RVRT> for Instruction

source§

fn from(op: RVRT) -> Self

Converts to this type from the input type.
source§

impl From<S256> for Instruction

source§

fn from(op: S256) -> Self

Converts to this type from the input type.
source§

impl From<SB> for Instruction

source§

fn from(op: SB) -> Self

Converts to this type from the input type.
source§

impl From<SCWQ> for Instruction

source§

fn from(op: SCWQ) -> Self

Converts to this type from the input type.
source§

impl From<SLL> for Instruction

source§

fn from(op: SLL) -> Self

Converts to this type from the input type.
source§

impl From<SLLI> for Instruction

source§

fn from(op: SLLI) -> Self

Converts to this type from the input type.
source§

impl From<SMO> for Instruction

source§

fn from(op: SMO) -> Self

Converts to this type from the input type.
source§

impl From<SRL> for Instruction

source§

fn from(op: SRL) -> Self

Converts to this type from the input type.
source§

impl From<SRLI> for Instruction

source§

fn from(op: SRLI) -> Self

Converts to this type from the input type.
source§

impl From<SRW> for Instruction

source§

fn from(op: SRW) -> Self

Converts to this type from the input type.
source§

impl From<SRWQ> for Instruction

source§

fn from(op: SRWQ) -> Self

Converts to this type from the input type.
source§

impl From<SUB> for Instruction

source§

fn from(op: SUB) -> Self

Converts to this type from the input type.
source§

impl From<SUBI> for Instruction

source§

fn from(op: SUBI) -> Self

Converts to this type from the input type.
source§

impl From<SW> for Instruction

source§

fn from(op: SW) -> Self

Converts to this type from the input type.
source§

impl From<SWW> for Instruction

source§

fn from(op: SWW) -> Self

Converts to this type from the input type.
source§

impl From<SWWQ> for Instruction

source§

fn from(op: SWWQ) -> Self

Converts to this type from the input type.
source§

impl From<TIME> for Instruction

source§

fn from(op: TIME) -> Self

Converts to this type from the input type.
source§

impl From<TR> for Instruction

source§

fn from(op: TR) -> Self

Converts to this type from the input type.
source§

impl From<TRO> for Instruction

source§

fn from(op: TRO) -> Self

Converts to this type from the input type.
source§

impl From<WDAM> for Instruction

source§

fn from(op: WDAM) -> Self

Converts to this type from the input type.
source§

impl From<WDCM> for Instruction

source§

fn from(op: WDCM) -> Self

Converts to this type from the input type.
source§

impl From<WDDV> for Instruction

source§

fn from(op: WDDV) -> Self

Converts to this type from the input type.
source§

impl From<WDMD> for Instruction

source§

fn from(op: WDMD) -> Self

Converts to this type from the input type.
source§

impl From<WDML> for Instruction

source§

fn from(op: WDML) -> Self

Converts to this type from the input type.
source§

impl From<WDMM> for Instruction

source§

fn from(op: WDMM) -> Self

Converts to this type from the input type.
source§

impl From<WDOP> for Instruction

source§

fn from(op: WDOP) -> Self

Converts to this type from the input type.
source§

impl From<WQAM> for Instruction

source§

fn from(op: WQAM) -> Self

Converts to this type from the input type.
source§

impl From<WQCM> for Instruction

source§

fn from(op: WQCM) -> Self

Converts to this type from the input type.
source§

impl From<WQDV> for Instruction

source§

fn from(op: WQDV) -> Self

Converts to this type from the input type.
source§

impl From<WQMD> for Instruction

source§

fn from(op: WQMD) -> Self

Converts to this type from the input type.
source§

impl From<WQML> for Instruction

source§

fn from(op: WQML) -> Self

Converts to this type from the input type.
source§

impl From<WQMM> for Instruction

source§

fn from(op: WQMM) -> Self

Converts to this type from the input type.
source§

impl From<WQOP> for Instruction

source§

fn from(op: WQOP) -> Self

Converts to this type from the input type.
source§

impl From<XOR> for Instruction

source§

fn from(op: XOR) -> Self

Converts to this type from the input type.
source§

impl From<XORI> for Instruction

source§

fn from(op: XORI) -> Self

Converts to this type from the input type.
source§

impl FromIterator<Instruction> for Vec<u32>

Available on crate feature alloc only.
source§

fn from_iter<I: IntoIterator<Item = Instruction>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl FromIterator<Instruction> for Vec<u8>

Available on crate feature alloc only.
source§

fn from_iter<I: IntoIterator<Item = Instruction>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for Instruction

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 Instruction

source§

fn eq(&self, other: &Instruction) -> 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 Serialize for Instruction

source§

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

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<[u8; 4]> for Instruction

source§

type Error = InvalidOpcode

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

fn try_from([op, a, b, c]: [u8; 4]) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<u32> for Instruction

source§

type Error = InvalidOpcode

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

fn try_from(u: RawInstruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for Instruction

source§

impl Eq for Instruction

source§

impl StructuralPartialEq for Instruction

Auto Trait Implementations§

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,