pub struct TestMemory<const BASE_ADDR: u64, const SIZE: usize> { /* private fields */ }Implementations§
Source§impl<const BASE_ADDR: u64, const SIZE: usize> TestMemory<BASE_ADDR, SIZE>
impl<const BASE_ADDR: u64, const SIZE: usize> TestMemory<BASE_ADDR, SIZE>
Sourcepub fn get_mut_bytes(
&mut self,
address: u64,
size: usize,
) -> Result<&mut [u8], VirtualMemoryError>
pub fn get_mut_bytes( &mut self, address: u64, size: usize, ) -> Result<&mut [u8], VirtualMemoryError>
Get a mutable slice of memory
Trait Implementations§
Source§impl<const BASE_ADDR: u64, const SIZE: usize> Clone for TestMemory<BASE_ADDR, SIZE>
impl<const BASE_ADDR: u64, const SIZE: usize> Clone for TestMemory<BASE_ADDR, SIZE>
Source§fn clone(&self) -> TestMemory<BASE_ADDR, SIZE>
fn clone(&self) -> TestMemory<BASE_ADDR, SIZE>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const BASE_ADDR: u64, const SIZE: usize> VirtualMemory for TestMemory<BASE_ADDR, SIZE>
impl<const BASE_ADDR: u64, const SIZE: usize> VirtualMemory for TestMemory<BASE_ADDR, SIZE>
Source§fn read<T>(&self, address: u64) -> Result<T, VirtualMemoryError>where
T: BasicInt,
fn read<T>(&self, address: u64) -> Result<T, VirtualMemoryError>where
T: BasicInt,
Read a value from memory at the specified address
Source§unsafe fn read_unchecked<T>(&self, address: u64) -> Twhere
T: BasicInt,
unsafe fn read_unchecked<T>(&self, address: u64) -> Twhere
T: BasicInt,
Unchecked read a value from memory at the specified address. Read more
Source§fn read_slice(
&self,
address: u64,
len: u32,
) -> Result<&[u8], VirtualMemoryError>
fn read_slice( &self, address: u64, len: u32, ) -> Result<&[u8], VirtualMemoryError>
Read a contiguous byte slice from memory
Source§fn write<T>(&mut self, address: u64, value: T) -> Result<(), VirtualMemoryError>where
T: BasicInt,
fn write<T>(&mut self, address: u64, value: T) -> Result<(), VirtualMemoryError>where
T: BasicInt,
Write a value to memory at the specified address
Source§fn write_slice(
&mut self,
address: u64,
data: &[u8],
) -> Result<(), VirtualMemoryError>
fn write_slice( &mut self, address: u64, data: &[u8], ) -> Result<(), VirtualMemoryError>
Write a contiguous byte slice to memory
impl<const BASE_ADDR: u64, const SIZE: usize> Copy for TestMemory<BASE_ADDR, SIZE>
Auto Trait Implementations§
impl<const BASE_ADDR: u64, const SIZE: usize> Freeze for TestMemory<BASE_ADDR, SIZE>
impl<const BASE_ADDR: u64, const SIZE: usize> RefUnwindSafe for TestMemory<BASE_ADDR, SIZE>
impl<const BASE_ADDR: u64, const SIZE: usize> Send for TestMemory<BASE_ADDR, SIZE>
impl<const BASE_ADDR: u64, const SIZE: usize> Sync for TestMemory<BASE_ADDR, SIZE>
impl<const BASE_ADDR: u64, const SIZE: usize> Unpin for TestMemory<BASE_ADDR, SIZE>
impl<const BASE_ADDR: u64, const SIZE: usize> UnsafeUnpin for TestMemory<BASE_ADDR, SIZE>
impl<const BASE_ADDR: u64, const SIZE: usize> UnwindSafe for TestMemory<BASE_ADDR, SIZE>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more