Type Alias mozjs_sys::jsapi::JSFunToStringOp

source ·
pub type JSFunToStringOp = Option<unsafe extern "C" fn(cx: *mut JSContext, obj: HandleObject, isToSource: bool) -> *mut JSString>;
Expand description

The type of ObjectOps::funToString. This callback allows an object to provide a custom string to use when Function.prototype.toString is invoked on that object. A null return value means OOM.

Aliased Type§

enum JSFunToStringOp {
    None,
    Some(unsafe extern "C" fn(_: *mut JSContext, _: Handle<*mut JSObject>, _: bool) -> *mut JSString),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut JSContext, _: Handle<*mut JSObject>, _: bool) -> *mut JSString)

Some value of type T.