Trait wasmer::ExportableWithGenerics
source · pub trait ExportableWithGenerics<'a, Args: WasmTypeList, Rets: WasmTypeList>: Sized {
// Required method
fn get_self_from_extern_with_generics(
_extern: &'a Extern,
) -> Result<Self, ExportError>;
}
Expand description
A trait for accessing exports (like Exportable
) but it takes generic
Args
and Rets
parameters so that TypedFunction
can be accessed directly
as well.
Required Methods§
sourcefn get_self_from_extern_with_generics(
_extern: &'a Extern,
) -> Result<Self, ExportError>
fn get_self_from_extern_with_generics( _extern: &'a Extern, ) -> Result<Self, ExportError>
Get an export with the given generics.
Object Safety§
This trait is not object safe.
Implementors§
impl<'a, T: Exportable<'a> + Clone + 'static> ExportableWithGenerics<'a, (), ()> for T
We implement it for all concrete Exportable
types (that are Clone
)
with empty Args
and Rets
.