Struct core_wasm_ast::traverse::WasmModule
source · pub struct WasmModule {
pub inner: Arc<Module>,
pub func_names: Mutex<HashMap<u32, String>>,
/* private fields */
}Fields§
§inner: Arc<Module>§func_names: Mutex<HashMap<u32, String>>Implementations§
source§impl WasmModule
impl WasmModule
pub fn new(inner: Arc<Module>) -> Self
pub fn add_func_name(&self, funcidx: u32, name: &str)
pub fn get_coredump(&self) -> Result<Coredump, Box<dyn Error>>
pub fn add_data(&self, offset: u32, bytes: &[u8]) -> (u32, u32)
pub fn is_func_imported(&self, funcidx: u32) -> bool
pub fn imports(&self) -> &Vec<Import>
pub fn globals(&self) -> &Vec<Global>
pub fn func_locals_count(&self, funcidx: u32) -> u32
pub fn func_locals(&self, funcidx: u32) -> Vec<CodeLocal>
pub fn is_func_exported(&self, funcidx: u32) -> bool
pub fn get_export_func( &self, name: &str ) -> Result<(&Code, Type), Box<dyn Error>>
sourcepub fn get_func_type(&self, funcidx: u32) -> Type
pub fn get_func_type(&self, funcidx: u32) -> Type
Retrieve the type of a function, note that this doesn’t work for imported functions as they have their type expressed differently.