Struct parity_wasm::elements::Module
[−]
[src]
pub struct Module { /* fields omitted */ }
WebAssembly module
Methods
impl Module
[src]
fn new(sections: Vec<Section>) -> Self
New module with sections
fn into_sections(self) -> Vec<Section>
Destructure the module, yielding sections
fn version(&self) -> u32
Version of module.
fn sections(&self) -> &[Section]
Sections list. Each known section is optional and may appear at most once.
fn sections_mut(&mut self) -> &mut Vec<Section>
Sections list (mutable) Each known section is optional and may appear at most once.
fn code_section(&self) -> Option<&CodeSection>
Code section, if any.
fn type_section(&self) -> Option<&TypeSection>
Types section, if any.
fn import_section(&self) -> Option<&ImportSection>
Imports section, if any.
fn global_section(&self) -> Option<&GlobalSection>
Globals section, if any.
fn export_section(&self) -> Option<&ExportSection>
Exports section, if any.
fn table_section(&self) -> Option<&TableSection>
Table section, if any.
fn data_section(&self) -> Option<&DataSection>
Data section, if any.
fn elements_section(&self) -> Option<&ElementSection>
Element section, if any.
fn memory_section(&self) -> Option<&MemorySection>
Memory section, if any.
fn function_section(&self) -> Option<&FunctionSection>
Functions signatures section, if any.
fn start_section(&self) -> Option<u32>
Start section, if any.
Trait Implementations
impl Default for Module
[src]
impl Deserialize for Module
[src]
type Error = Error
Serialization error produced by deserialization routine.
fn deserialize<R: Read>(reader: &mut R) -> Result<Self, Self::Error>
Deserialize type from serial i/o
impl Serialize for Module
[src]
type Error = Error
Serialization error produced by serialization routine.
fn serialize<W: Write>(self, w: &mut W) -> Result<(), Self::Error>
Serialize type to serial i/o
impl From<ModuleScaffold> for Module
[src]
fn from(module: ModuleScaffold) -> Self
Performs the conversion.