Skip to main content

InstructionFetcher

Trait InstructionFetcher 

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

Generic instruction fetcher

Required Methods§

Source

fn fetch_instruction( &mut self, memory: &Memory, ) -> Result<FetchInstructionResult<I>, ExecutionError<<<I as Instruction>::Reg as Register>::Type, CustomError>>

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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