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§
Source§impl<Constant: Clone, Value: Clone + Debug> Clone for Instruction<Constant, Value>
impl<Constant: Clone, Value: Clone + Debug> Clone for Instruction<Constant, Value>
Source§fn clone(&self) -> Instruction<Constant, Value>
fn clone(&self) -> Instruction<Constant, Value>
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 moreAuto 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> UnsafeUnpin 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