Struct parity_wasm::elements::Module
source · [−]pub struct Module { /* private fields */ }
Expand description
WebAssembly module
Implementations
Construct a module from a slice.
Destructure the module, yielding sections
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.
Insert a section, in the correct section ordering. This will fail with an error, if the section can only appear 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.
True if a name section is present.
NOTE: this can return true even if the section was not parsed, hence names_section()
may return None
even if this returns true
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
Auto Trait Implementations
impl RefUnwindSafe for Module
impl UnwindSafe for Module
Blanket Implementations
Mutably borrows from an owned value. Read more