pub struct PvModule { /* private fields */ }Expand description
A decoded, ready-to-run WASM module.
Implementations§
Source§impl PvModule
impl PvModule
Sourcepub fn invoke_i32(&self, func: &str, args: &[i32]) -> Result<Vec<i32>>
pub fn invoke_i32(&self, func: &str, args: &[i32]) -> Result<Vec<i32>>
Invoke an exported function with explicit integer arguments (test/inspection
entry point that bypasses the (ptr, len) host ABI).
Sourcepub fn export_count(&self) -> usize
pub fn export_count(&self) -> usize
Number of exported items (for introspection / tests).
Trait Implementations§
Source§impl WasmExec for PvModule
impl WasmExec for PvModule
Source§fn call_scalar(&self, func: &str, input: &[u8]) -> Result<i32>
fn call_scalar(&self, func: &str, input: &[u8]) -> Result<i32>
Write
input to guest memory at offset 0, call func(ptr, len) -> i32,
and return the scalar result.Source§fn apply_in_place(&self, func: &str, input: &[u8]) -> Result<Vec<u8>>
fn apply_in_place(&self, func: &str, input: &[u8]) -> Result<Vec<u8>>
As
call_scalar, but read the (in-place mutated) region back out.Auto Trait Implementations§
impl Forget for PvModule
impl Freeze for PvModule
impl Move for PvModule
impl RefUnwindSafe for PvModule
impl Send for PvModule
impl Sync for PvModule
impl Unpin for PvModule
impl UnsafeUnpin for PvModule
impl UnwindSafe for PvModule
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