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

pub trait Class: Managed + Any {
    type Internals;
    pub fn constructor<'a, C: Context<'a>>(
        cx: &mut C
    ) -> JsResult<'a, JsFunction<Self>> { ... }
pub 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

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

Produces a handle to the constructor function for this class.

pub 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>>, 
[src]

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

Loading content...

Implementors

Loading content...