Struct web_assembler::builder::ModuleBuilder
[−]
[src]
pub struct ModuleBuilder(_);
Methods
impl ModuleBuilder
[src]
fn new() -> Self
[src]
fn build(self) -> Module
[src]
fn add_type(&mut self, ty: FuncType) -> TypeIndex
[src]
fn add_import(&mut self, ty: ImportEntry) -> ImportIndex
[src]
fn add_table(&mut self, ty: TableType) -> TableIndex
[src]
fn add_memory(&mut self, ty: MemoryType) -> MemoryIndex
[src]
fn add_global(&mut self, ty: GlobalVariable) -> GlobalIndex
[src]
fn add_export(&mut self, ty: ExportEntry) -> ExportIndex
[src]
fn start(&mut self, index: FunctionIndex)
[src]
fn add_element(&mut self, ty: ElemSegment) -> ElementIndex
[src]
fn add_data(&mut self, ty: DataSegment) -> DataIndex
[src]
fn new_function(&mut self, (t, body): (FuncType, FunctionBody)) -> FunctionIndex
[src]
fn new_data(
&mut self,
idx: MemoryIndex,
offset: Code,
data: Vec<u8>
) -> DataIndex
[src]
&mut self,
idx: MemoryIndex,
offset: Code,
data: Vec<u8>
) -> DataIndex
fn new_global(&mut self, ty: GlobalType, init: Code) -> GlobalIndex
[src]
Trait Implementations
impl NewTable<Range<u32>> for ModuleBuilder
[src]
impl NewTable<RangeFrom<u32>> for ModuleBuilder
[src]
impl NewMemory<Range<u32>> for ModuleBuilder
[src]
fn new_memory(&mut self, range: Range<u32>) -> MemoryIndex
[src]
impl NewMemory<RangeFrom<u32>> for ModuleBuilder
[src]
fn new_memory(&mut self, range: RangeFrom<u32>) -> MemoryIndex
[src]
impl Export<FunctionIndex> for ModuleBuilder
[src]
fn export<S: Into<String>>(
&mut self,
name: S,
index: FunctionIndex
) -> ExportIndex
[src]
&mut self,
name: S,
index: FunctionIndex
) -> ExportIndex
impl Export<TableIndex> for ModuleBuilder
[src]
fn export<S: Into<String>>(&mut self, name: S, index: TableIndex) -> ExportIndex
[src]
impl Export<MemoryIndex> for ModuleBuilder
[src]
fn export<S: Into<String>>(
&mut self,
name: S,
index: MemoryIndex
) -> ExportIndex
[src]
&mut self,
name: S,
index: MemoryIndex
) -> ExportIndex
impl Export<GlobalIndex> for ModuleBuilder
[src]
fn export<S: Into<String>>(
&mut self,
name: S,
index: GlobalIndex
) -> ExportIndex
[src]
&mut self,
name: S,
index: GlobalIndex
) -> ExportIndex
impl Import<TypeIndex> for ModuleBuilder
[src]
fn import<S, T>(&mut self, module: S, name: T, index: TypeIndex) -> ImportIndex where
S: Into<String>,
T: Into<String>,
[src]
S: Into<String>,
T: Into<String>,
impl Import<TableType> for ModuleBuilder
[src]
fn import<S, T>(&mut self, module: S, name: T, index: TableType) -> ImportIndex where
S: Into<String>,
T: Into<String>,
[src]
S: Into<String>,
T: Into<String>,
impl Import<MemoryType> for ModuleBuilder
[src]
fn import<S, T>(&mut self, module: S, name: T, index: MemoryType) -> ImportIndex where
S: Into<String>,
T: Into<String>,
[src]
S: Into<String>,
T: Into<String>,
impl Import<GlobalType> for ModuleBuilder
[src]
fn import<S, T>(&mut self, module: S, name: T, index: GlobalType) -> ImportIndex where
S: Into<String>,
T: Into<String>,
[src]
S: Into<String>,
T: Into<String>,