Struct fuel_vm::prelude::Instruction
source ·
[−]pub struct Instruction { /* private fields */ }
Expand description
A version of Opcode that can used without unnecessary branching
Implementations
Extracts fields from a raw instruction
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
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
.
pub fn from_bytes_iter<I>(bytes: I) -> Vec<Instruction, Global> where
I: IntoIterator<Item = u8>,
pub fn from_bytes_iter<I>(bytes: I) -> Vec<Instruction, Global> where
I: IntoIterator<Item = u8>,
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.
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