Trait wasmtime_runtime::RuntimeLinearMemory [−][src]
pub trait RuntimeLinearMemory: Send + Sync {
fn byte_size(&self) -> usize;
fn maximum_byte_size(&self) -> Option<usize>;
fn grow_to(&mut self, size: usize) -> Result<()>;
fn vmmemory(&self) -> VMMemoryDefinition;
}
Expand description
A linear memory
Required methods
fn maximum_byte_size(&self) -> Option<usize>
fn maximum_byte_size(&self) -> Option<usize>
Returns the maximum number of bytes the memory can grow to.
Returns None
if the memory is unbounded.
Grow memory to the specified amount of bytes.
Returns an error if memory can’t be grown by the specified amount of bytes.
fn vmmemory(&self) -> VMMemoryDefinition
fn vmmemory(&self) -> VMMemoryDefinition
Return a VMMemoryDefinition
for exposing the memory to compiled wasm
code.