Struct boa::object::FunctionBuilder[][src]

pub struct FunctionBuilder<'context> { /* fields omitted */ }
Expand description

Builder for creating native function objects

Implementations

Create a new FunctionBuilder for creating a native function.

Create a new FunctionBuilder for creating a closure function.

Create a new closure function with additional captures.

Note

You can only move variables that implement Debug + Any + Trace + Clone. In other words, only NativeObject + Clone objects are movable.

Specify the name property of object function object.

The default is "" (empty string).

Specify the length property of object function object.

How many arguments this function takes.

The default is 0.

Specify the whether the object function object can be called with new keyword.

The default is false.

Build the function object.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.