Struct rusty_v8::Set [−][src]
#[repr(C)]pub struct Set(_);
Expand description
An instance of the built-in Set constructor (ECMA-262, 6th Edition, 23.2.1).
Methods from Deref<Target = Object>
Set only return Just(true) or Empty(), so if it should never fail, use result.Check().
Set only return Just(true) or Empty(), so if it should never fail, use result.Check().
pub fn set_prototype(
&self,
scope: &mut HandleScope<'_>,
prototype: Local<'_, Value>
) -> Option<bool>
pub fn set_prototype(
&self,
scope: &mut HandleScope<'_>,
prototype: Local<'_, Value>
) -> Option<bool>
Set the prototype object. This does not skip objects marked to be skipped by proto and it does not consult the security handler.
pub fn create_data_property(
&self,
scope: &mut HandleScope<'_>,
key: Local<'_, Name>,
value: Local<'_, Value>
) -> Option<bool>
pub fn create_data_property(
&self,
scope: &mut HandleScope<'_>,
key: Local<'_, Name>,
value: Local<'_, Value>
) -> Option<bool>
Implements CreateDataProperty (ECMA-262, 7.3.4).
Defines a configurable, writable, enumerable property with the given value on the object unless the property already exists and is not configurable or the object is not extensible.
Returns true on success.
pub fn define_own_property(
&self,
scope: &mut HandleScope<'_>,
key: Local<'_, Name>,
value: Local<'_, Value>,
attr: PropertyAttribute
) -> Option<bool>
pub fn define_own_property(
&self,
scope: &mut HandleScope<'_>,
key: Local<'_, Name>,
value: Local<'_, Value>,
attr: PropertyAttribute
) -> Option<bool>
Implements DefineOwnProperty.
In general, CreateDataProperty will be faster, however, does not allow for specifying attributes.
Returns true on success.
pub fn get<'s>(
&self,
scope: &mut HandleScope<'s>,
key: Local<'_, Value>
) -> Option<Local<'s, Value>>
Get the prototype object. This does not skip objects marked to be skipped by proto and it does not consult the security handler.
pub fn set_accessor(
&self,
scope: &mut HandleScope<'_>,
name: Local<'_, Name>,
getter: impl for<'s> MapFnTo<AccessorNameGetterCallback<'s>>
) -> Option<bool>
pub fn set_accessor(
&self,
scope: &mut HandleScope<'_>,
name: Local<'_, Name>,
getter: impl for<'s> MapFnTo<AccessorNameGetterCallback<'s>>
) -> Option<bool>
Note: SideEffectType affects the getter only, not the setter.
pub fn set_accessor_with_setter(
&self,
scope: &mut HandleScope<'_>,
name: Local<'_, Name>,
getter: impl for<'s> MapFnTo<AccessorNameGetterCallback<'s>>,
setter: impl for<'s> MapFnTo<AccessorNameSetterCallback<'s>>
) -> Option<bool>
Returns the context in which the object was created.
pub fn get_own_property_names<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Array>>
pub fn get_own_property_names<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Array>>
This function has the same functionality as GetPropertyNames but the returned array doesn’t contain the names of properties from prototype objects.
Returns an array containing the names of the filtered 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.
Gets the number of internal fields for this Object.
pub fn get_internal_field<'s>(
&self,
scope: &mut HandleScope<'s>,
index: usize
) -> Option<Local<'s, Value>>
pub fn get_internal_field<'s>(
&self,
scope: &mut HandleScope<'s>,
index: usize
) -> Option<Local<'s, Value>>
Gets the value from an internal field.
Sets the value in an internal field. Returns false when the index is out of bounds, true otherwise.
pub fn get_private<'s>(
&self,
scope: &mut HandleScope<'s>,
key: Local<'_, Private>
) -> Option<Local<'s, Value>>
pub fn get_private<'s>(
&self,
scope: &mut HandleScope<'s>,
key: Local<'_, Private>
) -> Option<Local<'s, Value>>
Functionality for private properties. This is an experimental feature, use at your own risk. Note: Private properties are not inherited. Do not rely on this, since it may change.
pub fn set_private<'s>(
&self,
scope: &mut HandleScope<'s>,
key: Local<'_, Private>,
value: Local<'_, Value>
) -> Option<bool>
pub fn set_private<'s>(
&self,
scope: &mut HandleScope<'s>,
key: Local<'_, Private>,
value: Local<'_, Value>
) -> Option<bool>
Functionality for private properties. This is an experimental feature, use at your own risk. Note: Private properties are not inherited. Do not rely on this, since it may change.
pub fn delete_private<'s>(
&self,
scope: &mut HandleScope<'s>,
key: Local<'_, Private>
) -> Option<bool>
pub fn delete_private<'s>(
&self,
scope: &mut HandleScope<'s>,
key: Local<'_, Private>
) -> Option<bool>
Functionality for private properties. This is an experimental feature, use at your own risk. Note: Private properties are not inherited. Do not rely on this, since it may change.
pub fn has_private<'s>(
&self,
scope: &mut HandleScope<'s>,
key: Local<'_, Private>
) -> Option<bool>
pub fn has_private<'s>(
&self,
scope: &mut HandleScope<'s>,
key: Local<'_, Private>
) -> Option<bool>
Functionality for private properties. This is an experimental feature, use at your own risk. Note: Private properties are not inherited. Do not rely on this, since it may change.