pub struct ExportFunctionMetadata { /* private fields */ }
Expand description

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.

Implementations

Create an ExportFunctionMetadata type with information about the exported function.

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

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Returns the size of the referenced value in bytes. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

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

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type for metadata in pointers and references to Self.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

upcast ref

upcast mut ref

upcast boxed dyn