pub trait InstructionSet: Copy {
// Required methods
fn opcode_from_u8(self, byte: u8) -> Option<Opcode>;
fn opcode_to_u8(self, opcode: Opcode) -> Option<u8>;
fn parse_instruction(
self,
opcode: usize,
chunk: u128,
offset: u32,
skip: u32,
) -> Instruction;
// Provided method
fn supports_opcode(self, opcode: Opcode) -> bool { ... }
}Required Methods§
fn opcode_from_u8(self, byte: u8) -> Option<Opcode>
fn opcode_to_u8(self, opcode: Opcode) -> Option<u8>
fn parse_instruction( self, opcode: usize, chunk: u128, offset: u32, skip: u32, ) -> Instruction
Provided Methods§
fn supports_opcode(self, opcode: Opcode) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.