IntoFunc

Trait IntoFunc 

Source
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

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§

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,