Skip to main content

JS_NewClass

Function JS_NewClass 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn JS_NewClass( rt: *mut JsRuntime, class_id: ClassId, class_def: *const JSClassDef, ) -> c_int
Expand description

JS_NewClass: register a class with the runtime.

ยงSafety

rt must be a live runtime and class_def a valid JSClassDef whose strings and function pointers outlive the class.