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

A subsection of the linking custom section that provides extra information about the symbols present in this Wasm object file.

Implementations

Construct a new symbol table subsection encoder.

Define a function symbol in this symbol table.

The name must be omitted if index references an imported table and the WASM_SYM_EXPLICIT_NAME flag is not set.

Define a global symbol in this symbol table.

The name must be omitted if index references an imported table and the WASM_SYM_EXPLICIT_NAME flag is not set.

Define a table symbol in this symbol table.

The name must be omitted if index references an imported table and the WASM_SYM_EXPLICIT_NAME flag is not set.

Add a data symbol to this symbol table.

This is a weak symbol.

This flag is mutually exclusive with WASM_SYM_BINDING_LOCAL.

When linking multiple modules defining the same symbol, all weak definitions are discarded if any strong definitions exist; then if multiple weak definitions exist all but one (unspecified) are discarded; and finally it is an error if more than one definition remains.

This is a local symbol.

This flag is mutually exclusive with WASM_SYM_BINDING_WEAK.

Local symbols are not to be exported, or linked to other modules/sections. The names of all non-local symbols must be unique, but the names of local symbols are not considered for uniqueness. A local function or global symbol cannot reference an import.

This is a hidden symbol.

Hidden symbols are not to be exported when performing the final link, but may be linked to other modules.

This symbol is not defined.

For non-data symbols, this must match whether the symbol is an import or is defined; for data symbols, determines whether a segment is specified.

This symbol is intended to be exported from the wasm module to the host environment.

This differs from the visibility flags in that it effects the static linker.

This symbol uses an explicit symbol name, rather than reusing the name from a wasm import.

This allows it to remap imports from foreign WebAssembly modules into local symbols with different names.

This symbol is intended to be included in the linker output, regardless of whether it is used by the program.

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

Encode the type into the given byte sink.

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

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

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.