pub struct TestMemory<const MEMORY_SIZE: usize> { /* private fields */ }Implementations§
Source§impl<const MEMORY_SIZE: usize> TestMemory<MEMORY_SIZE>
impl<const MEMORY_SIZE: usize> TestMemory<MEMORY_SIZE>
Sourcepub fn new(base_addr: u64) -> Self
pub fn new(base_addr: u64) -> Self
Create a new test memory instance with the specified base address
Sourcepub fn get_bytes(
&self,
address: u64,
size: usize,
) -> Result<&[u8], VirtualMemoryError>
pub fn get_bytes( &self, address: u64, size: usize, ) -> Result<&[u8], VirtualMemoryError>
Get a slice of memory
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 MEMORY_SIZE: usize> Debug for TestMemory<MEMORY_SIZE>
impl<const MEMORY_SIZE: usize> Debug for TestMemory<MEMORY_SIZE>
Source§impl<const MEMORY_SIZE: usize> VirtualMemory for TestMemory<MEMORY_SIZE>
impl<const MEMORY_SIZE: usize> VirtualMemory for TestMemory<MEMORY_SIZE>
Auto Trait Implementations§
impl<const MEMORY_SIZE: usize> Freeze for TestMemory<MEMORY_SIZE>
impl<const MEMORY_SIZE: usize> RefUnwindSafe for TestMemory<MEMORY_SIZE>
impl<const MEMORY_SIZE: usize> Send for TestMemory<MEMORY_SIZE>
impl<const MEMORY_SIZE: usize> Sync for TestMemory<MEMORY_SIZE>
impl<const MEMORY_SIZE: usize> Unpin for TestMemory<MEMORY_SIZE>
impl<const MEMORY_SIZE: usize> UnwindSafe for TestMemory<MEMORY_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
§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