Struct fuel_asm::Instruction [−][src]
pub struct Instruction { /* fields omitted */ }
Expand description
A version of Opcode that can used without unnecessary branching
Implementations
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.
Splits a Word into two Instruction
that can be used to construct crate::Opcode
pub const fn into_inner(
self
) -> (OpcodeRepr, RegisterId, RegisterId, RegisterId, RegisterId, Word)
pub const fn into_inner(
self
) -> (OpcodeRepr, RegisterId, RegisterId, RegisterId, RegisterId, Word)
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 the “default value” for a type. Read more
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations
Mutably borrows from an owned value. Read more