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