pub struct Memory { /* private fields */ }Implementations§
Source§impl Memory
impl Memory
pub fn allocate(memories: &[Memory<'_>]) -> Result<Self>
pub fn new_data( &mut self, segment: &DataSegment<'_>, globals: &Globals, ) -> Result<()>
pub fn size(&self) -> u32
pub fn grow(&mut self, num_pages: u32) -> i32
pub fn load<V: LittleEndian>(&self, addr: usize, at: usize) -> Result<V>
pub fn store<V: LittleEndian>( &mut self, addr: usize, v: V, at: usize, ) -> Result<()>
pub fn data(&self) -> &[u8] ⓘ
pub fn data_mut(&mut self) -> &mut [u8] ⓘ
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memory
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