Struct fuel_asm::Instruction[][src]

pub struct Instruction { /* fields omitted */ }
Expand description

A version of Opcode that can used without unnecessary branching

Implementations

Size of an opcode in bytes

Extracts fields from a raw instruction

Opcode

Register A

Register B

Register C

Register D

Immediate with 6 bits

Immediate with 12 bits

Immediate with 18 bits

Immediate with 24 bits

Create a Instruction from a slice of bytes

Safety

The caller must ensure that the slice is has at least Self::LEN bytes.

Convert the opcode to bytes representation

Splits a Word into two Instruction that can be used to construct crate::Opcode

Convert the instruction into its internal representation

(repr, $ra, $rb, $rc, $rd, immediate)

Create a Instruction from a slice of bytes

This function will fail if the length of the bytes is smaller than Instruction::LEN.

Create a set of Instruction from an iterator of bytes

If not padded to Self::LEN, will consume the unaligned bytes but won’t try to parse an instruction from them.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Creates a value from an iterator. Read more

Creates a value from an iterator. Read more

Feeds this value into the given Hasher. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.