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§

source

fn get_self_from_extern_with_generics( _extern: &'a Extern ) -> Result<Self, ExportError>

Get an export with the given generics.

Implementors§

source§

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.