pub struct Instruction<Constant, Value: Debug> {
pub op_code: u8,
pub name: &'static str,
pub instruction_fn: InstructionFn<Constant, Value>,
}
Expand description
Describes one type of instructions that the VM supports.
The instruction must have a unique id (op_code
), a name
for debugging
and an instruction_fn
which implements the logic of the instruction.
Fields§
§op_code: u8
§name: &'static str
§instruction_fn: InstructionFn<Constant, Value>
Trait Implementations§
Auto Trait Implementations§
impl<Constant, Value> Freeze for Instruction<Constant, Value>
impl<Constant, Value> RefUnwindSafe for Instruction<Constant, Value>
impl<Constant, Value> Send for Instruction<Constant, Value>
impl<Constant, Value> Sync for Instruction<Constant, Value>
impl<Constant, Value> Unpin for Instruction<Constant, Value>
impl<Constant, Value> UnwindSafe for Instruction<Constant, Value>
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