Struct wasmer_vm::Mmap

source ·
pub struct Mmap { /* private fields */ }
Expand description

A simple struct consisting of a page-aligned pointer to page-aligned and initially-zeroed memory and a length.

Implementations§

Construct a new empty instance of Mmap.

Create a new Mmap pointing to at least size bytes of page-aligned accessible memory.

Create a new Mmap pointing to accessible_size bytes of page-aligned accessible memory, within a reserved mapping of mapping_size bytes. accessible_size and mapping_size must be native page-size multiples.

Make the memory starting at start and extending for len bytes accessible. start and len must be native page-size multiples and describe a range within self’s reserved memory.

Return the allocated memory as a slice of u8.

Return the allocated memory as a mutable slice of u8.

Return the allocated memory as a pointer to u8.

Return the allocated memory as a mutable pointer to u8.

Return the length of the allocated memory.

Return whether any memory has been allocated.

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

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.