Trait spectrusty::chip::MemoryAccess
source · pub trait MemoryAccess {
type Memory: ZxMemory;
type MemoryExt: MemoryExtension;
fn memory_ext_ref(&self) -> &Self::MemoryExt;
fn memory_ext_mut(&mut self) -> &mut Self::MemoryExt;
fn memory_ref(&self) -> &Self::Memory;
fn memory_mut(&mut self) -> &mut Self::Memory;
fn memory_with_ext_mut(
&mut self
) -> (&mut Self::Memory, &mut Self::MemoryExt);
}
Expand description
A trait for directly accessing an emulated memory implementation and memory extensions.
Required Associated Types§
Required Methods§
sourcefn memory_ext_ref(&self) -> &Self::MemoryExt
fn memory_ext_ref(&self) -> &Self::MemoryExt
Returns a read-only reference to the memory extension.
sourcefn memory_ext_mut(&mut self) -> &mut Self::MemoryExt
fn memory_ext_mut(&mut self) -> &mut Self::MemoryExt
Returns a mutable reference to the memory extension.
sourcefn memory_ref(&self) -> &Self::Memory
fn memory_ref(&self) -> &Self::Memory
Returns a reference to the memory.
sourcefn memory_mut(&mut self) -> &mut Self::Memory
fn memory_mut(&mut self) -> &mut Self::Memory
Returns a mutable reference to the memory.
sourcefn memory_with_ext_mut(&mut self) -> (&mut Self::Memory, &mut Self::MemoryExt)
fn memory_with_ext_mut(&mut self) -> (&mut Self::Memory, &mut Self::MemoryExt)
Returns mutable references to both the memory and the memory extension.