[][src]Struct wasmer_engine::ExportFunctionMetadata

pub struct ExportFunctionMetadata { /* fields omitted */ }

Extra metadata about ExportFunctions.

The metadata acts as a kind of manual virtual dispatch. We store the user-supplied WasmerEnv as a void pointer and have methods on it that have been adapted to accept a void pointer.

This struct owns the original host_env, thus when it gets dropped it calls the drop function on it.


impl ExportFunctionMetadata[src]

pub unsafe fn new(
    host_env: *mut c_void,
    import_init_function_ptr: Option<ImportInitializerFuncPtr>,
    host_env_clone_fn: fn(_: *mut c_void) -> *mut c_void,
    host_env_drop_fn: fn(_: *mut c_void)
) -> Self

Create an ExportFunctionMetadata type with information about the exported function.


  • the host_env must be Send.
  • all function pointers must work on any thread.

Trait Implementations

impl Debug for ExportFunctionMetadata[src]

impl Drop for ExportFunctionMetadata[src]

impl PartialEq<ExportFunctionMetadata> for ExportFunctionMetadata[src]

impl Send for ExportFunctionMetadata[src]

This can be Send because host_env comes from WasmerEnv which is Send. Therefore all operations should work on any thread.

impl StructuralPartialEq for ExportFunctionMetadata[src]

impl Sync for ExportFunctionMetadata[src]

This data may be shared across threads, drop is an unsafe function pointer, so care must be taken when calling it.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.