pub struct Instruction {
pub op: Opcode,
pub a: u8,
pub b: u8,
pub c: u8,
pub imm: i32,
}Expand description
A single packed instruction word.
Layout is 8 bytes (op + a/b/c + signed imm) so a Vec<Instruction>
stays dense and the interpreter can fetch with a single aligned load.
Operand meaning is opcode-specific; see Opcode and [crate::builder].
Fields§
§op: Opcode§a: u8§b: u8§c: u8§imm: i32Implementations§
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Instruction
Source§impl Debug for Instruction
impl Debug for Instruction
Source§impl Display for Instruction
impl Display for Instruction
impl Eq for Instruction
Source§impl Hash for Instruction
impl Hash for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more