Skip to main content

InstructionFetcher

Trait InstructionFetcher 

Source
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§

Source

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

Implementors§

Source§

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