Struct neon::types::JsFunction [−][src]
Expand description
A JavaScript function object.
Implementations
pub fn new<'a, C, U>(
cx: &mut C,
f: fn(_: FunctionContext<'_>) -> JsResult<'_, U>
) -> JsResult<'a, JsFunction> where
C: Context<'a>,
U: Value,
Trait Implementations
fn get<'a, C: Context<'a>, K: PropertyKey>(
self,
cx: &mut C,
key: K
) -> NeonResult<Handle<'a, JsValue>>
This is supported on crate feature
napi-6
only.fn set<'a, C: Context<'a>, K: PropertyKey, W: Value>(
self,
cx: &mut C,
key: K,
val: Handle<'_, W>
) -> NeonResult<bool>
Auto Trait Implementations
impl<T> RefUnwindSafe for JsFunction<T> where
T: RefUnwindSafe,
impl<T = JsObject> !Send for JsFunction<T>
impl<T = JsObject> !Sync for JsFunction<T>
impl<T> Unpin for JsFunction<T> where
T: Unpin,
impl<T> UnwindSafe for JsFunction<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more