Struct v8::value::Function [] [src]

pub struct Function(_, _);

A JavaScript function object (ECMA-262, 15.3).

Methods

impl Function
[src]

Create a function in the current execution context for a given callback.

Call an Object as a function if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.

Call an Object as a function if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.

Creates a function from a set of raw pointers.

Returns the underlying raw pointer behind this function.

Methods from Deref<Target=Object>

Returns an array containing the names of the enumerable properties of this object, including properties from prototype objects.

The array returned by this method contains the same values as would be enumerated by a for-in statement over this object.

This function has the same functionality as get_property_names but the returned array doesn't contain the names of properties from prototype objects.

Get the prototype object.

This does not skip objects marked to be skipped by __proto__ and it does not consult the security handler.

Set the prototype object.

This does not skip objects marked to be skipped by __proto__ and it does not consult the security handler.

Call builtin Object.prototype.toString on this object.

This is different from Value::to_string that may call user-defined toString function. This one does not.

Returns the name of the function invoked as a constructor for this object.

Gets the number of internal fields for this Object

Gets the value from an internal field.

Sets the value in an internal field.

Gets a 2-byte-aligned native pointer from an internal field.

This field must have been set by set_aligned_pointer_in_internal_field, everything else leads to undefined behavior.

Sets a 2-byte-aligned native pointer in an internal field.

To retrieve such a field, get_aligned_pointer_from_internal_field must be used, everything else leads to undefined behavior.

Returns the identity hash for this object.

The current implementation uses a hidden property on the object to store the identity hash.

The return value will never be 0. Also, it is not guaranteed to be unique.

Clone this object with a fast but shallow copy.

Values will point to the same values as the original object.

Checks whether a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.

When an Object is callable this method returns true.

True if this object is a constructor.

Call an Object as a function if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.

Call an Object as a function if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.

Call an Object as a constructor if a callback is set by the ObjectTemplate::SetCallAsFunctionHandler method.

Note: This method behaves like the Function::NewInstance method.

Returns the underlying raw pointer behind this object.

Trait Implementations

impl Debug for Function
[src]

Formats the value using the given formatter.

impl Deref for Function
[src]

The resulting type after dereferencing

The method called to dereference a value

impl Clone for Function
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Drop for Function
[src]

A method called when the value goes out of scope. Read more