Function quickjs_runtime::quickjs_utils::functions::new_native_function
source · pub unsafe fn new_native_function(
context: *mut JSContext,
name: &str,
func: JSCFunction,
arg_count: i32,
is_constructor: bool,
) -> Result<QuickJsValueAdapter, JsError>
Expand description
create a new Function object which calls a native method
§Safety
When passing a context pointer please make sure the corresponding QuickJsContext is still valid