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

    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 attibutes 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.

Implementors