Struct wasmedge_sys::Module
source · pub struct Module { /* private fields */ }
Expand description
Defines compiled in-memory representation of an input WASM binary.
Module is also called AST Module in WasmEdge terminology. A Module is a compiled in-memory representation of an input WebAssembly binary. In the instantiation process, a Module is used to create a module stance, from which the exported functions, tables, memories, and globals can be fetched.
Implementations§
source§impl Module
impl Module
sourcepub fn count_of_imports(&self) -> u32
pub fn count_of_imports(&self) -> u32
Returns the number of wasm imports in the Module.
sourcepub fn imports(&self) -> Vec<ImportType<'_>>
pub fn imports(&self) -> Vec<ImportType<'_>>
Returns the types of wasm imports in the Module.
sourcepub fn count_of_exports(&self) -> u32
pub fn count_of_exports(&self) -> u32
Returns the count of wasm exports in the Module.
sourcepub fn exports(&self) -> Vec<ExportType<'_>>
pub fn exports(&self) -> Vec<ExportType<'_>>
Returns the types of wasm exports in the Module.
sourcepub fn as_ptr(&self) -> *const WasmEdge_FunctionTypeContext
Available on crate feature ffi
only.
pub fn as_ptr(&self) -> *const WasmEdge_FunctionTypeContext
ffi
only.Provides a raw pointer to the inner ASTModule context.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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