pub type napi_addon_register_func = Option<unsafe extern "C" fn(_: *mut napi_env__, _: *mut napi_value__) -> *mut napi_value__>;

Aliased Type§

enum napi_addon_register_func {
    None,
    Some(unsafe extern "C" fn(_: *mut napi_env__, _: *mut napi_value__) -> *mut napi_value__),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut napi_env__, _: *mut napi_value__) -> *mut napi_value__)

Some value of type T.

Trait Implementations§

source§

impl<'a, T> ExtractArgFromJs<'a> for Option<T>where T: JSValue<'a> + Sized,

source§

fn label() -> &'static str

source§

fn convert_arg_at(js_cb: &'a JsCallback, index: usize) -> Result<Self, NjError>

convert js callback argument at index
source§

impl<'a, T> ExtractFromJs<'a> for Option<T>where T: JSValue<'a> + Sized,

for optional argument

source§

fn label() -> &'static str

source§

fn extract(js_cb: &'a mut JsCallback) -> Result<Self, NjError>

extract from js callback
source§

impl<T> TryIntoJs for Option<T>where T: TryIntoJs,

§

impl<T> Value for Option<T>where T: Value,

§

fn record(&self, key: &Field, visitor: &mut dyn Visit)

Visits this value with the given Visitor.