[][src]Trait neon::object::Class

pub trait Class: Managed + Any {
    type Internals;
    fn constructor<'a, C: Context<'a>>(
        cx: &mut C
    ) -> JsResult<'a, JsFunction<Self>> { ... }
fn new<'a, 'b, C: Context<'a>, A, AS>(
        cx: &mut C,
        args: AS
    ) -> JsResult<'a, Self>
    where
        A: Value + 'b,
        AS: IntoIterator<Item = Handle<'b, A>>
, { ... } }

The trait implemented by Neon classes.

This trait is not intended to be implemented manually; it is implemented automatically by creating a class with the class syntax of the declare_types! macro.

Associated Types

Loading content...

Provided methods

fn constructor<'a, C: Context<'a>>(cx: &mut C) -> JsResult<'a, JsFunction<Self>>

Produces a handle to the constructor function for this class.

fn new<'a, 'b, C: Context<'a>, A, AS>(
    cx: &mut C,
    args: AS
) -> JsResult<'a, Self> where
    A: Value + 'b,
    AS: IntoIterator<Item = Handle<'b, A>>, 

Convenience method for constructing new instances of this class without having to extract the constructor function.

Loading content...

Implementors

Loading content...