pub trait Class: NativeObject + Sized {
    const NAME: &'static str;
    const LENGTH: usize = 0usize;
    const ATTRIBUTES: Attribute = _;

    fn constructor(
        this: &JsValue,
        args: &[JsValue],
        context: &mut Context
    ) -> JsResult<Self>; fn init(class: &mut ClassBuilder<'_>) -> JsResult<()>; }
Expand description

Native class.

Required Associated Constants

The binding name of the object.

Provided Associated Constants

The amount of arguments the class constructor takes, default is 0.

The attributes the class will be binded with, default is writable, enumerable, configurable.

Required Methods

The constructor of the class.

Initializes the internals and the methods of the class.