ClassConstructor

Trait ClassConstructor 

Source
pub trait ClassConstructor: Class {
    // Required method
    fn raw_constructor(
        this: &JsValue,
        args: &[JsValue],
        context: &mut Context,
    ) -> JsResult<JsValue>
       where Self: Sized;
}
Expand description

This is a wrapper around Class::constructor that sets the internal data of a class.

This is automatically implemented, when a type implements Class.

Required Methods§

Source

fn raw_constructor( this: &JsValue, args: &[JsValue], context: &mut Context, ) -> JsResult<JsValue>
where Self: Sized,

The raw constructor that matches the NativeFunction signature.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§