[][src]Trait boa::class::Class

pub trait Class: NativeObject + Sized {
    pub const NAME: &'static str;
    pub const LENGTH: usize;
    pub const ATTRIBUTE: Attribute;

    pub fn constructor(
        this: &Value,
        args: &[Value],
        context: &mut Context
    ) -> Result<Self>;
pub fn init(class: &mut ClassBuilder<'_>) -> Result<()>; }

Native class.

Associated Constants

pub const NAME: &'static str[src]

The binding name of the object.

pub const LENGTH: usize[src]

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

pub const ATTRIBUTE: Attribute[src]

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

Loading content...

Required methods

pub fn constructor(
    this: &Value,
    args: &[Value],
    context: &mut Context
) -> Result<Self>
[src]

The constructor of the class.

pub fn init(class: &mut ClassBuilder<'_>) -> Result<()>[src]

Initializes the internals and the methods of the class.

Loading content...

Implementors

Loading content...