pub trait AsFunction<'js, A, R> {
    fn num_args() -> Range<usize>;
    fn call(&self, input: &Input<'js>) -> Result<Value<'js>>;

    fn post<'js_>(_ctx: Ctx<'js_>, _func: &Function<'js_>) -> Result<()> { ... }
}
Expand description

The trait to wrap rust function to JS directly

Required Methods

The possible range of function arguments

Call as JS function

Provided Methods

Post-processing the function

Implementations on Foreign Types

Implementors