Struct parity_wasm::elements::Module
[−]
[src]
pub struct Module { /* fields omitted */ }
WebAssembly module
Methods
impl Module
[src]
pub fn new(sections: Vec<Section>) -> Self
[src]
New module with sections
pub fn into_sections(self) -> Vec<Section>
[src]
Destructure the module, yielding sections
pub fn version(&self) -> u32
[src]
Version of module.
pub fn sections(&self) -> &[Section]
[src]
Sections list. Each known section is optional and may appear at most once.
pub fn sections_mut(&mut self) -> &mut Vec<Section>
[src]
Sections list (mutable) Each known section is optional and may appear at most once.
pub fn code_section(&self) -> Option<&CodeSection>
[src]
Code section, if any.
pub fn type_section(&self) -> Option<&TypeSection>
[src]
Types section, if any.
pub fn import_section(&self) -> Option<&ImportSection>
[src]
Imports section, if any.
pub fn global_section(&self) -> Option<&GlobalSection>
[src]
Globals section, if any.
pub fn export_section(&self) -> Option<&ExportSection>
[src]
Exports section, if any.
pub fn table_section(&self) -> Option<&TableSection>
[src]
Table section, if any.
pub fn data_section(&self) -> Option<&DataSection>
[src]
Data section, if any.
pub fn elements_section(&self) -> Option<&ElementSection>
[src]
Element section, if any.
pub fn memory_section(&self) -> Option<&MemorySection>
[src]
Memory section, if any.
pub fn function_section(&self) -> Option<&FunctionSection>
[src]
Functions signatures section, if any.
pub fn start_section(&self) -> Option<u32>
[src]
Start section, if any.
pub fn parse_names(self) -> Result<Self, (Vec<(usize, Error)>, Self)>
[src]
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.
pub fn import_count(&self, count_type: ImportCountType) -> usize
[src]
Count imports by provided type
pub fn functions_space(&self) -> usize
[src]
Query functions space
pub fn globals_space(&self) -> usize
[src]
Query globals space
pub fn table_space(&self) -> usize
[src]
Query table space
pub fn memory_space(&self) -> usize
[src]
Query memory space
Trait Implementations
impl Debug for Module
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Module
[src]
fn clone(&self) -> Module
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
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>
[src]
Deserialize type from serial i/o