MemoryAccess

Trait MemoryAccess 

Source
pub trait MemoryAccess {
    type Memory: ZxMemory;
    type MemoryExt: MemoryExtension;

    // Required methods
    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§

Source

fn memory_ext_ref(&self) -> &Self::MemoryExt

Returns a read-only reference to the memory extension.

Source

fn memory_ext_mut(&mut self) -> &mut Self::MemoryExt

Returns a mutable reference to the memory extension.

Source

fn memory_ref(&self) -> &Self::Memory

Returns a reference to the memory.

Source

fn memory_mut(&mut self) -> &mut Self::Memory

Returns a mutable reference to the memory.

Source

fn memory_with_ext_mut(&mut self) -> (&mut Self::Memory, &mut Self::MemoryExt)

Returns mutable references to both the memory and the memory extension.

Implementors§