pub trait InstructionFetcher<I, Memory, CustomError>where
Self: ProgramCounter<<<I as Instruction>::Reg as Register>::Type, Memory, CustomError>,
I: Instruction,{
// Required method
fn fetch_instruction(
&mut self,
memory: &mut Memory,
) -> Result<FetchInstructionResult<I>, ExecutionError<<<I as Instruction>::Reg as Register>::Type, I, CustomError>>;
}Expand description
Generic instruction fetcher
Required Methods§
Sourcefn fetch_instruction(
&mut self,
memory: &mut Memory,
) -> Result<FetchInstructionResult<I>, ExecutionError<<<I as Instruction>::Reg as Register>::Type, I, CustomError>>
fn fetch_instruction( &mut self, memory: &mut Memory, ) -> Result<FetchInstructionResult<I>, ExecutionError<<<I as Instruction>::Reg as Register>::Type, I, CustomError>>
Fetch a single instruction at a specified address and advance the program counter