Skip to main content

RuntimeLinearMemory

Trait RuntimeLinearMemory 

Source
pub trait RuntimeLinearMemory {
    // Required methods
    fn size(&self) -> u32;
    fn grow(&self, delta: u32) -> Option<u32>;
    fn vmmemory(&self) -> VMMemoryDefinition;
}
Expand description

A linear memory

Required Methods§

Source

fn size(&self) -> u32

Returns the number of allocated wasm pages.

Source

fn grow(&self, delta: u32) -> Option<u32>

Grow memory by the specified amount of wasm pages.

Returns None if memory can’t be grown by the specified amount of wasm pages.

Source

fn vmmemory(&self) -> VMMemoryDefinition

Return a VMMemoryDefinition for exposing the memory to compiled wasm code.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§