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

WebAssembly module

Implementations

New module with sections

Destructure the module, yielding sections

Version of module.

Sections list.

Each known section is optional and may appear at most once.

Sections list (mutable).

Each known section is optional and may appear at most once.

Code section reference, if any.

Code section mutable reference, if any.

Types section reference, if any.

Types section mutable reference, if any.

Imports section reference, if any.

Imports section mutable reference, if any.

Globals section reference, if any.

Globals section mutable reference, if any.

Exports section reference, if any.

Exports section mutable reference, if any.

Table section reference, if any.

Table section mutable reference, if any.

Data section reference, if any.

Data section mutable reference, if any.

Element section reference, if any.

Element section mutable reference, if any.

Memory section reference, if any.

Memory section mutable reference, if any.

Functions signatures section reference, if any.

Functions signatures section mutable reference, if any.

Start section, if any.

Changes the module’s start section.

Removes the module’s start section.

Returns an iterator over the module’s custom sections

Sets the payload associated with the given custom section, or adds a new custom section, as appropriate.

Removes the given custom section, if it exists. Returns the removed section if it existed, or None otherwise.

Functions signatures section reference, if any.

NOTE: name section is not parsed by default so names_section could return None even if name section exists. Call parse_names to parse name section

Functions signatures section mutable reference, if any.

NOTE: name section is not parsed by default so names_section could return None even if name section exists. Call parse_names to parse name section

Try to parse name section in place/

Corresponding custom section with proper header will convert to name sections If some of them will fail to be decoded, Err variant is returned with the list of (index, Error) tuples of failed sections.

Try to parse reloc section in place.

Corresponding custom section with proper header will convert to reloc sections If some of them will fail to be decoded, Err variant is returned with the list of (index, Error) tuples of failed sections.

Count imports by provided type.

Query functions space.

Query globals space.

Query table space.

Query memory space.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Serialization error produced by deserialization routine.
Deserialize type from serial i/o
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialization error produced by serialization routine.
Serialize type to serial i/o

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.