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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so 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
.