[][src]Struct neon::types::JsFunction

#[repr(C)]
pub struct JsFunction<T: Object = JsObject> { /* fields omitted */ }

A JavaScript function object.

Methods

impl JsFunction[src]

pub fn new<'a, C, U>(
    cx: &mut C,
    f: fn(_: FunctionContext) -> JsResult<U>
) -> JsResult<'a, JsFunction> where
    C: Context<'a>,
    U: Value
[src]

impl<CL: Object> JsFunction<CL>[src]

pub fn call<'a, 'b, C: Context<'a>, T, A, AS>(
    self,
    cx: &mut C,
    this: Handle<'b, T>,
    args: AS
) -> JsResult<'a, JsValue> where
    T: Value,
    A: Value + 'b,
    AS: IntoIterator<Item = Handle<'b, A>>, 
[src]

pub fn construct<'a, 'b, C: Context<'a>, A, AS>(
    self,
    cx: &mut C,
    args: AS
) -> JsResult<'a, CL> where
    A: Value + 'b,
    AS: IntoIterator<Item = Handle<'b, A>>, 
[src]

Trait Implementations

impl<T: Clone + Object> Clone for JsFunction<T>[src]

impl<T: Copy + Object> Copy for JsFunction<T>[src]

impl<T: Object> Managed for JsFunction<T>[src]

impl<T: Object> Object for JsFunction<T>[src]

impl<T: Object> Value for JsFunction<T>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Value for T where
    T: Class
[src]