pub trait HostFunction<Args>: 'static {
// Required method
fn call(&self, scope: &mut Scope<'_>) -> JsResult<Value>;
}Expand description
What Js::new_function takes: a closure over
a Scope. Args is the marker the closure’s shape selects on.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".