Struct riscy::memory::NaiveMemory
source · pub struct NaiveMemory { /* private fields */ }
Expand description
NaiveMemory
is an incredibly simple, but inefficient
implementation that uses a hashmap to assign each memory addresses to its current value.
It is here only as an illustration of the Memory
interface.
Implementations§
source§impl NaiveMemory
impl NaiveMemory
Trait Implementations§
source§impl Debug for NaiveMemory
impl Debug for NaiveMemory
source§impl Memory for NaiveMemory
impl Memory for NaiveMemory
fn load_byte(&self, addr: Addr) -> u8
fn store_byte(&mut self, addr: Addr, value: u8)
fn load_halfword(&self, addr: Addr) -> u16
fn load_word(&self, addr: Addr) -> u32
fn store_halfword(&mut self, addr: Addr, value: u16)
fn store_word(&mut self, addr: Addr, value: u32)
fn memcpy(&mut self, base_addr: Addr, buf: &[u8])
Auto Trait Implementations§
impl RefUnwindSafe for NaiveMemory
impl Send for NaiveMemory
impl Sync for NaiveMemory
impl Unpin for NaiveMemory
impl UnwindSafe for NaiveMemory
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more