pub struct VirtualMemory<M: Memory> { /* private fields */ }Trait Implementations§
Source§impl<M: Clone + Memory> Clone for VirtualMemory<M>
impl<M: Clone + Memory> Clone for VirtualMemory<M>
Source§fn clone(&self) -> VirtualMemory<M>
fn clone(&self) -> VirtualMemory<M>
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<M: Memory> Memory for VirtualMemory<M>
impl<M: Memory> Memory for VirtualMemory<M>
Source§fn size(&self) -> u64
fn size(&self) -> u64
Returns the current size of the stable memory in WebAssembly
pages. (One WebAssembly page is 64Ki bytes.)
Source§fn grow(&self, pages: u64) -> i64
fn grow(&self, pages: u64) -> i64
Tries to grow the memory by
pages many pages containing
zeroes. If successful, returns the previous size of the
memory (in pages). Otherwise, returns -1.Source§fn read(&self, offset: u64, dst: &mut [u8])
fn read(&self, offset: u64, dst: &mut [u8])
Copies the data referred to by
offset out of the stable memory
and replaces the corresponding bytes in dst.Auto Trait Implementations§
impl<M> !Freeze for VirtualMemory<M>
impl<M> !RefUnwindSafe for VirtualMemory<M>
impl<M> !Send for VirtualMemory<M>
impl<M> !Sync for VirtualMemory<M>
impl<M> Unpin for VirtualMemory<M>
impl<M> !UnwindSafe for VirtualMemory<M>
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