pub struct Memory {
    pub id: usize,
}Expand description
WebAssembly memory
Fields§
§id: usizeThe id of the memory in the store
Trait Implementations§
Source§impl WasmMemory<Engine> for Memory
 
impl WasmMemory<Engine> for Memory
Source§fn new(ctx: impl AsContextMut<Engine>, ty: MemoryType) -> Result<Self>
 
fn new(ctx: impl AsContextMut<Engine>, ty: MemoryType) -> Result<Self>
Creates a new linear memory to the store.
Source§fn ty(&self, ctx: impl AsContext<Engine>) -> MemoryType
 
fn ty(&self, ctx: impl AsContext<Engine>) -> MemoryType
Returns the memory type of the linear memory.
Source§fn grow(&self, ctx: impl AsContextMut<Engine>, additional: u32) -> Result<u32>
 
fn grow(&self, ctx: impl AsContextMut<Engine>, additional: u32) -> Result<u32>
Grows the linear memory by the given amount of new pages.
Source§fn current_pages(&self, _: impl AsContext<Engine>) -> u32
 
fn current_pages(&self, _: impl AsContext<Engine>) -> u32
Returns the amount of pages in use by the linear memory.
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin 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