Skip to main content

DomainMemory

Trait DomainMemory 

Source
pub trait DomainMemory {
    type V: DomainValue;

    // Required methods
    fn read(
        &self,
        space: MemorySpaceId,
        addr: Self::V,
        size: usize,
    ) -> Result<Self::V, EmulatorErrorKind>;
    fn write(
        &mut self,
        space: MemorySpaceId,
        addr: Self::V,
        size: usize,
        data: Self::V,
    ) -> Result<(), EmulatorErrorKind>;
}

Required Associated Types§

Required Methods§

Source

fn read( &self, space: MemorySpaceId, addr: Self::V, size: usize, ) -> Result<Self::V, EmulatorErrorKind>

Reads a value from the given address. The size of the value must be less than or equal to the size of the region being read from.

Source

fn write( &mut self, space: MemorySpaceId, addr: Self::V, size: usize, data: Self::V, ) -> Result<(), EmulatorErrorKind>

Writes a value to the given address. The size of the value must be less than or equal to the size of the region being written to.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§