Struct wasm_gen::WasmCodeGen
source · pub struct WasmCodeGen { /* private fields */ }
Implementations
sourceimpl WasmCodeGen
impl WasmCodeGen
pub fn new() -> WasmCodeGen
pub fn to_bytes(&self) -> Vec<u8>
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_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 RefUnwindSafe for WasmCodeGen
impl Send for WasmCodeGen
impl Sync for WasmCodeGen
impl Unpin for WasmCodeGen
impl UnwindSafe for WasmCodeGen
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more