pub trait JsFunction {
type Ret;
const ARITY: usize;
}Expand description
The signature a Function<T> is typed with: a fn(Args..) -> Ret whose
slots name the JS types the function takes and returns.
A slot may be any Rust carrier of a JS type, a handle such as JsString
or a converted value such as Nullable<JsString> or Option<Number>, as
a Promise<T> or Array<T> type argument may. The call* and bind*
methods marshal through the erased JsValue representation and so bound
their slots to JsGeneric handles themselves.
Required Associated Constants§
Required Associated Types§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".