Struct wasm_encoder::SymbolTable [−][src]
A subsection of the linking custom section that provides extra information about the symbols present in this Wasm object file.
Implementations
impl SymbolTable
[src]
pub fn new() -> Self
[src]
Construct a new symbol table subsection encoder.
pub fn function(
&mut self,
flags: u32,
index: u32,
name: Option<&str>
) -> &mut Self
[src]
&mut self,
flags: u32,
index: u32,
name: Option<&str>
) -> &mut Self
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.
pub fn global(
&mut self,
flags: u32,
index: u32,
name: Option<&str>
) -> &mut Self
[src]
&mut self,
flags: u32,
index: u32,
name: Option<&str>
) -> &mut Self
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.
pub fn table(&mut self, flags: u32, index: u32, name: Option<&str>) -> &mut Self
[src]
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.
pub fn data(
&mut self,
flags: u32,
name: &str,
definition: Option<DataSymbolDefinition>
) -> &mut Self
[src]
&mut self,
flags: u32,
name: &str,
definition: Option<DataSymbolDefinition>
) -> &mut Self
Add a data symbol to this symbol table.
impl SymbolTable
[src]
pub const WASM_SYM_BINDING_WEAK: u32
[src]
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.
pub const WASM_SYM_BINDING_LOCAL: u32
[src]
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.
pub const WASM_SYM_VISIBILITY_HIDDEN: u32
[src]
This is a hidden symbol.
Hidden symbols are not to be exported when performing the final link, but may be linked to other modules.
pub const WASM_SYM_UNDEFINED: u32
[src]
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.
pub const WASM_SYM_EXPORTED: u32
[src]
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.
pub const WASM_SYM_EXPLICIT_NAME: u32
[src]
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.
pub const WASM_SYM_NO_STRIP: u32
[src]
This symbol is intended to be included in the linker output, regardless of whether it is used by the program.
Trait Implementations
impl Clone for SymbolTable
[src]
fn clone(&self) -> SymbolTable
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SymbolTable
[src]
Auto Trait Implementations
impl RefUnwindSafe for SymbolTable
impl Send for SymbolTable
impl Sync for SymbolTable
impl Unpin for SymbolTable
impl UnwindSafe for SymbolTable
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,