[−][src]Trait lc3::InstructionHandler
An instruction handler interface.
Associated Types
type Context
Handler context.
type Err
Err return type after processing instructions.
TODO: Convert Err
into std::ops::Try
once it is stabilized
Required methods
fn create_vm(initial_context: Self::Context) -> VM<Self>
fn process_instruction(
vm_state: &mut VMState,
context: &mut Self::Context,
instruction: Instruction
) -> Result<(), Self::Err>
vm_state: &mut VMState,
context: &mut Self::Context,
instruction: Instruction
) -> Result<(), Self::Err>
Implementors
impl InstructionHandler for TrivialHandler
[src]
type Context = (Empty, Sink)
type Err = IOError
fn create_vm(_: Self::Context) -> VM<Self>
[src]
fn process_instruction(
vm_state: &mut VMState,
context: &mut Self::Context,
instruction: Instruction
) -> Result<(), Self::Err>
[src]
vm_state: &mut VMState,
context: &mut Self::Context,
instruction: Instruction
) -> Result<(), Self::Err>