Type Alias JSWrapObjectCallback

Source
pub type JSWrapObjectCallback = Option<unsafe extern "C" fn(*mut JSContext, Handle<*mut JSObject>, Handle<*mut JSObject>) -> *mut JSObject>;
Expand description

Callback used to ask the embedding for the cross compartment wrapper handler that implements the desired prolicy for this kind of object in the destination compartment. |obj| is the object to be wrapped. If |existing| is non-nullptr, it will point to an existing wrapper object that should be re-used if possible. |existing| is guaranteed to be a cross-compartment wrapper with a lazily-defined prototype and the correct global. It is guaranteed not to wrap a function.

Aliased Type§

pub enum JSWrapObjectCallback {
    None,
    Some(unsafe extern "C" fn(*mut JSContext, Handle<*mut JSObject>, Handle<*mut JSObject>) -> *mut JSObject),
}

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.