pub struct ModuleBuilder { /* private fields */ }
Implementations§
Source§impl ModuleBuilder
impl ModuleBuilder
pub fn from_module(module: Module) -> Self
pub fn shift_func_index(self, inserted_at: u32) -> ModuleFuncIndexShifter
pub fn build(self) -> Module
pub fn push_custom_section( &mut self, name: impl Into<Cow<'static, str>>, data: impl Into<Vec<u8>>, )
Sourcepub fn add_func(&mut self, ty: FuncType, function: Function) -> u32
pub fn add_func(&mut self, ty: FuncType, function: Function) -> u32
Adds a new function to the module.
Returns index from function section
pub fn push_type(&mut self, ty: FuncType) -> u32
pub fn push_import(&mut self, import: Import) -> u32
pub fn set_table(&mut self, table: Table)
pub fn push_global(&mut self, global: Global) -> u32
pub fn push_export(&mut self, export: Export)
pub fn push_element(&mut self, element: Element)
pub fn push_data(&mut self, data: Data)
Trait Implementations§
Source§impl Debug for ModuleBuilder
impl Debug for ModuleBuilder
Source§impl Default for ModuleBuilder
impl Default for ModuleBuilder
Source§fn default() -> ModuleBuilder
fn default() -> ModuleBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleBuilder
impl RefUnwindSafe for ModuleBuilder
impl Send for ModuleBuilder
impl Sync for ModuleBuilder
impl Unpin for ModuleBuilder
impl UnwindSafe for ModuleBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more