pub trait IntoFunc<WB: WasmBackend, Params, Results, Env> {
    // Required method
    fn into_func(
        self,
        ctx: &mut impl AsContextMut<WB>
    ) -> <WB as WasmBackend>::HostFunction;
}
Expand description

A helper trait for creating a function with a static signature. Should not be implemented by users. Implemented for all functions that meet the following criteria: * implement Send + Sync + ’static * take or not take ImportCallContext as first parameter * take from 0 to 16 i32 parameters * return () or i32

Required Methods§

source

fn into_func( self, ctx: &mut impl AsContextMut<WB> ) -> <WB as WasmBackend>::HostFunction

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<WB, F> IntoFunc<WB, (i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32,), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32,), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32,), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>, i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (i32,), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn(i32) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (), i32, WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>) -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (), i32, WithoutEnv> for F
where WB: WasmBackend, F: Fn() -> i32 + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (), (), WithEnv> for F
where WB: WasmBackend, F: Fn(<WB as WasmBackend>::ImportCallContext<'_>) + Send + Sync + 'static,

source§

impl<WB, F> IntoFunc<WB, (), (), WithoutEnv> for F
where WB: WasmBackend, F: Fn() + Send + Sync + 'static,