pub struct EmulatedMemory { /* private fields */ }Trait Implementations§
Source§impl Clone for EmulatedMemory
impl Clone for EmulatedMemory
Source§fn clone(&self) -> EmulatedMemory
fn clone(&self) -> EmulatedMemory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmulatedMemory
impl Debug for EmulatedMemory
Source§impl Default for EmulatedMemory
impl Default for EmulatedMemory
Source§fn default() -> EmulatedMemory
fn default() -> EmulatedMemory
Returns the “default value” for a type. Read more
Source§impl DomainMemory for EmulatedMemory
impl DomainMemory for EmulatedMemory
type V = SizedValue
Source§fn 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.
Source§fn write(
&mut self,
space: MemorySpaceId,
addr: Self::V,
size: usize,
value: Self::V,
) -> Result<(), EmulatorErrorKind>
fn write( &mut self, space: MemorySpaceId, addr: Self::V, size: usize, value: 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.
Source§impl EmulatorMemory for EmulatedMemory
impl EmulatorMemory for EmulatedMemory
Source§fn configure_spaces(&mut self, ctx: &Context<'_>)
fn configure_spaces(&mut self, ctx: &Context<'_>)
Prepares per-space bookkeeping for
ctx. Called before any access, and
cheap to call repeatedly: spaces are append-only, so an implementation
can skip the work when nothing has been added.Source§fn read_bytes(
&self,
space: MemorySpaceId,
addr: u64,
size: usize,
) -> Result<Vec<u8>, EmulatorErrorKind>
fn read_bytes( &self, space: MemorySpaceId, addr: u64, size: usize, ) -> Result<Vec<u8>, EmulatorErrorKind>
Reads
size raw bytes, without the value-domain’s width handling.Source§fn write_bytes(
&mut self,
space: MemorySpaceId,
addr: u64,
bytes: &[u8],
) -> Result<(), EmulatorErrorKind>
fn write_bytes( &mut self, space: MemorySpaceId, addr: u64, bytes: &[u8], ) -> Result<(), EmulatorErrorKind>
Writes raw bytes, creating the space if it does not exist yet.
Auto Trait Implementations§
impl Freeze for EmulatedMemory
impl RefUnwindSafe for EmulatedMemory
impl Send for EmulatedMemory
impl Sync for EmulatedMemory
impl Unpin for EmulatedMemory
impl UnsafeUnpin for EmulatedMemory
impl UnwindSafe for EmulatedMemory
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