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§
Sourcefn fetch_instruction(
&mut self,
memory: &mut Memory,
) -> Result<FetchInstructionResult<Instruction>, ExecutionError<Instruction, CustomError>>
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