Trait wasmer::Exportable[][src]

pub trait Exportable<'a>: Sized {
    fn to_export(&self) -> Export;
fn get_self_from_extern(
        _extern: &'a Extern
    ) -> Result<&'a Self, ExportError>;
fn into_weak_instance_ref(&mut self); }
Expand description

This trait is used to mark types as gettable from an Instance.

Required methods

This function is used when providedd the Extern as exportable, so it can be used while instantiating the Module.

Implementation of how to get the export corresponding to the implementing type from an Instance by name.

Convert the extern internally to hold a weak reference to the InstanceRef. This is useful for preventing cycles, for example for data stored in a type implementing WasmerEnv.

Implementors