pub struct ModuleBuilder {
pub funcs: PrimaryMap<FuncRef, Function>,
pub ctx: ModuleCtx,
/* private fields */
}Fields§
§funcs: PrimaryMap<FuncRef, Function>§ctx: ModuleCtxImplementations§
Source§impl ModuleBuilder
impl ModuleBuilder
pub fn new(ctx: ModuleCtx) -> Self
pub fn declare_function(&mut self, sig: Signature) -> FuncRef
pub fn make_global(&self, global: GlobalVariableData) -> GlobalVariable
pub fn global_by_name(&self, name: &str) -> Option<GlobalVariable>
pub fn declare_struct_type( &mut self, name: &str, fields: &[Type], packed: bool, ) -> Type
pub fn get_func_ref(&self, name: &str) -> Option<FuncRef>
pub fn get_sig(&self, func: FuncRef) -> &Signature
pub fn func_builder(&mut self, func: FuncRef) -> FunctionBuilder<'_>
pub fn build(self) -> Module
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleBuilder
impl !Send for ModuleBuilder
impl !Sync for ModuleBuilder
impl !UnwindSafe for ModuleBuilder
impl Freeze for ModuleBuilder
impl Unpin for ModuleBuilder
impl UnsafeUnpin 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