Enum parity_wasm::elements::Section[][src]

pub enum Section {
Show 16 variants Unparsed { id: u8, payload: Vec<u8>, }, Custom(CustomSection), Type(TypeSection), Import(ImportSection), Function(FunctionSection), Table(TableSection), Memory(MemorySection), Global(GlobalSection), Export(ExportSection), Start(u32), Element(ElementSection), DataCount(u32), Code(CodeSection), Data(DataSection), Name(NameSection), Reloc(RelocSection),
}
Expand description

Section in the WebAssembly module.

Variants

Unparsed

Section is unparsed.

Fields of Unparsed

id: u8

id of the unparsed section.

payload: Vec<u8>

raw bytes of the unparsed section.

Custom(CustomSection)

Custom section (id=0).

Tuple Fields of Custom

0: CustomSection
Type(TypeSection)

Types section.

Tuple Fields of Type

0: TypeSection
Import(ImportSection)

Import section.

Tuple Fields of Import

0: ImportSection
Function(FunctionSection)

Function signatures section.

Tuple Fields of Function

0: FunctionSection
Table(TableSection)

Table definition section.

Tuple Fields of Table

0: TableSection
Memory(MemorySection)

Memory definition section.

Tuple Fields of Memory

0: MemorySection
Global(GlobalSection)

Global entries section.

Tuple Fields of Global

0: GlobalSection
Export(ExportSection)

Export definitions.

Tuple Fields of Export

0: ExportSection
Start(u32)

Entry reference of the module.

Tuple Fields of Start

0: u32
Element(ElementSection)

Elements section.

Tuple Fields of Element

0: ElementSection
DataCount(u32)

Number of passive data entries in the data section

Tuple Fields of DataCount

0: u32
Code(CodeSection)

Function bodies section.

Tuple Fields of Code

0: CodeSection
Data(DataSection)

Data definition section.

Tuple Fields of Data

0: DataSection
Name(NameSection)

Name section.

Note that initially it is not parsed until parse_names is called explicitly.

Tuple Fields of Name

0: NameSection
Reloc(RelocSection)

Relocation section.

Note that initially it is not parsed until parse_reloc is called explicitly. Also note that currently there are serialization (but not de-serialization) issues with this section (#198).

Tuple Fields of Reloc

0: RelocSection

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

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 !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.