pub struct LocalMemory { /* private fields */ }Implementations§
Source§impl LocalMemory
impl LocalMemory
pub fn new(size: usize) -> Self
pub fn size(&self) -> usize
pub fn read_u8(&self, addr: u32) -> Result<u8, EmulatorError>
pub fn read_u16(&self, addr: u32) -> Result<u16, EmulatorError>
pub fn read_u32(&self, addr: u32) -> Result<u32, EmulatorError>
pub fn read_u64(&self, addr: u32) -> Result<u64, EmulatorError>
pub fn write_u8(&mut self, addr: u32, value: u8) -> Result<(), EmulatorError>
pub fn write_u16(&mut self, addr: u32, value: u16) -> Result<(), EmulatorError>
pub fn write_u32(&mut self, addr: u32, value: u32) -> Result<(), EmulatorError>
pub fn write_u64(&mut self, addr: u32, value: u64) -> Result<(), EmulatorError>
pub fn atomic_add( &mut self, addr: u32, value: u32, ) -> Result<u32, EmulatorError>
pub fn atomic_sub( &mut self, addr: u32, value: u32, ) -> Result<u32, EmulatorError>
pub fn atomic_min( &mut self, addr: u32, value: u32, ) -> Result<u32, EmulatorError>
pub fn atomic_max( &mut self, addr: u32, value: u32, ) -> Result<u32, EmulatorError>
pub fn atomic_and( &mut self, addr: u32, value: u32, ) -> Result<u32, EmulatorError>
pub fn atomic_or(&mut self, addr: u32, value: u32) -> Result<u32, EmulatorError>
pub fn atomic_xor( &mut self, addr: u32, value: u32, ) -> Result<u32, EmulatorError>
pub fn atomic_exchange( &mut self, addr: u32, value: u32, ) -> Result<u32, EmulatorError>
pub fn atomic_cas( &mut self, addr: u32, expected: u32, desired: u32, ) -> Result<u32, EmulatorError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalMemory
impl RefUnwindSafe for LocalMemory
impl Send for LocalMemory
impl Sync for LocalMemory
impl Unpin for LocalMemory
impl UnsafeUnpin for LocalMemory
impl UnwindSafe for LocalMemory
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