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§
type V: DomainValue
Required Methods§
Sourcefn read(
&self,
space: MemorySpaceId,
addr: Self::V,
size: usize,
) -> Result<Self::V, EmulatorErrorKind>
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.
Sourcefn write(
&mut self,
space: MemorySpaceId,
addr: Self::V,
size: usize,
data: Self::V,
) -> Result<(), EmulatorErrorKind>
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".