Trait JsFn
pub trait JsFn<A>:
Send
+ Sync
+ 'static { }Available on crate features
js and std only.Expand description
A host function with typed, extractor-style arguments.
Implemented for closures of up to twelve JsArg arguments as well
as for variadic closures taking a single JsArgs, returning any
JsFnOutput. Extra call arguments are ignored (js style), missing
ones error unless the parameter is an Option.
The A parameter is an inference marker; ignore it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".