pub struct WasmCodeGen { /* private fields */ }
Implementations§
source§impl WasmCodeGen
impl WasmCodeGen
pub fn new() -> WasmCodeGen
pub fn to_bytes(&self) -> Vec<u8>
pub fn set_name(&mut self, idx: usize, name: String)
pub fn add_type(&mut self, t: FuncType) -> usize
pub fn add_export(&mut self, name: String, idx: usize, export_type: ExportType)
pub fn add_func(&mut self, f: Func) -> usize
pub fn add_func_with_type(&mut self, f: Func, t: u32) -> usize
pub fn replace_code_func(&mut self, idx: usize, code: Vec<FuncCode>)
pub fn add_table( &mut self, elemtype: TableElemType, min: u32, max: u32, ) -> usize
pub fn add_element(&mut self, table: u32, offset: u32, funcs: Vec<u32>) -> usize
pub fn add_memory(&mut self, min: u32, max: u32) -> usize
pub fn add_data(&mut self, offset: u32, bytes: Vec<u8>) -> u32
pub fn add_import( &mut self, module: String, name: String, import_type: ImportType, typeidx: usize, ) -> usize
pub fn add_mutable_global(&mut self, valtype: u8, init: u32) -> usize
Auto Trait Implementations§
impl Freeze for WasmCodeGen
impl RefUnwindSafe for WasmCodeGen
impl Send for WasmCodeGen
impl Sync for WasmCodeGen
impl Unpin for WasmCodeGen
impl UnwindSafe for WasmCodeGen
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