pub struct Instance_type<'module> { /* private fields */ }
Implementations§
Source§impl<'module> Instance_type<'module>
impl<'module> Instance_type<'module>
pub fn New( Runtime: &Runtime_type, Module: &'module Module_type<'module>, Stack_size: usize, ) -> Result_type<Self>
pub fn Validate_native_pointer<T>(&self, Pointer: *const T, Size: usize) -> bool
pub fn Validate_WASM_pointer( &self, Address: WASM_pointer_type, Size: usize, ) -> bool
pub fn Convert_to_WASM_pointer<T>(&self, Pointer: *const T) -> WASM_pointer_type
Sourcepub unsafe fn Convert_to_native_pointer<T>(
&self,
Address: WASM_pointer_type,
) -> *mut T
pub unsafe fn Convert_to_native_pointer<T>( &self, Address: WASM_pointer_type, ) -> *mut T
§Safety
This function is unsafe because it is not checked that the address is valid.
pub fn Call_export_function( &self, Name: &str, Parameters: &Vec<WasmValue>, ) -> Result_type<Vec<WasmValue>>
pub fn Call_main( &self, Parameters: &Vec<WasmValue>, ) -> Result_type<Vec<WasmValue>>
pub fn Allocate<T>(&mut self, Size: usize) -> Result_type<*mut T>
pub fn Deallocate<T>(&mut self, Data: *mut T)
Trait Implementations§
Source§impl Drop for Instance_type<'_>
impl Drop for Instance_type<'_>
impl Send for Instance_type<'_>
Auto Trait Implementations§
impl<'module> Freeze for Instance_type<'module>
impl<'module> RefUnwindSafe for Instance_type<'module>
impl<'module> !Sync for Instance_type<'module>
impl<'module> Unpin for Instance_type<'module>
impl<'module> UnwindSafe for Instance_type<'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