[−][src]Struct wasmer_engine::ExportFunctionMetadata
Extra metadata about ExportFunction
s.
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
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
[src]
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.
Safety
- the
host_env
must beSend
. - 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]
pub fn eq(&self, other: &ExportFunctionMetadata) -> bool
[src]
pub fn ne(&self, other: &ExportFunctionMetadata) -> bool
[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
impl RefUnwindSafe for ExportFunctionMetadata
[src]
impl Unpin for ExportFunctionMetadata
[src]
impl UnwindSafe for ExportFunctionMetadata
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,