pub struct VMOwnedMemory { /* private fields */ }
Expand description

A linear memory instance.

Implementations§

Create a new linear memory instance with specified minimum and maximum number of wasm pages.

This creates a Memory with owned metadata: this can be used to create a memory that will be imported into Wasm modules.

Create a new linear memory instance with specified minimum and maximum number of wasm pages.

This creates a Memory with metadata owned by a VM, pointed to by vm_memory_location: this can be used to create a local memory.

Safety
  • vm_memory_location must point to a valid location in VM memory.

Converts this owned memory into shared memory

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.

Returns the type for this memory.

Returns the size of hte memory in pages

Returns the memory style for this memory.

Grow memory by the specified amount of wasm pages.

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

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

Owned memory can not be cloned (this will always return None)

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Deserializes using the given deserializer

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type for metadata in pointers and references to Self.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.