InstructionFetcher

Trait InstructionFetcher 

Source
pub trait InstructionFetcher<Instruction, Memory, CustomError>: ProgramCounter<<<Instruction as BaseInstruction>::Reg as Register>::Type, Memory, CustomError>
where Instruction: BaseInstruction, CustomError: Display,
{ // Required method fn fetch_instruction( &mut self, memory: &mut Memory, ) -> Result<FetchInstructionResult<Instruction>, ExecutionError<Instruction, CustomError>>; }
Expand description

Generic instruction fetcher

Required Methods§

Source

fn fetch_instruction( &mut self, memory: &mut Memory, ) -> Result<FetchInstructionResult<Instruction>, ExecutionError<Instruction, CustomError>>

Fetch a single instruction at a specified address and advance the program counter

Implementors§

Source§

impl<Instruction, Memory, CustomError> InstructionFetcher<Instruction, Memory, CustomError> for BasicInstructionFetcher<Instruction, CustomError>
where Instruction: BaseInstruction, Memory: VirtualMemory, CustomError: Display,