Struct boa_engine::builtins::object::OrdinaryObject
source · pub struct OrdinaryObject;
Expand description
An ordinary Javascript Object
.
Implementations§
source§impl OrdinaryObject
impl OrdinaryObject
sourcepub fn legacy_proto_getter(
this: &JsValue,
_: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn legacy_proto_getter( this: &JsValue, _: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
get Object.prototype.__proto__
The __proto__
getter function exposes the value of the
internal [[Prototype]]
of an object.
More information:
sourcepub fn legacy_proto_setter(
this: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn legacy_proto_setter( this: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
set Object.prototype.__proto__
The __proto__
setter allows the [[Prototype]]
of
an object to be mutated.
More information:
sourcepub fn legacy_define_getter(
this: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn legacy_define_getter( this: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.prototype.__defineGetter__(prop, func)
Binds an object’s property to a function to be called when that property is looked up.
More information:
sourcepub fn legacy_define_setter(
this: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn legacy_define_setter( this: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.prototype.__defineSetter__(prop, func)
Binds an object’s property to a function to be called when an attempt is made to set that property.
More information:
sourcepub fn legacy_lookup_getter(
this: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn legacy_lookup_getter( this: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.prototype.__lookupGetter__(prop)
Returns the function bound as a getter to the specified property.
More information:
sourcepub fn legacy_lookup_setter(
this: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn legacy_lookup_setter( this: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.prototype.__lookupSetter__(prop)
Returns the function bound as a getter to the specified property.
More information:
sourcepub fn create(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn create( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.create( proto, [propertiesObject] )
Creates a new object from the provided prototype.
More information:
sourcepub fn get_own_property_descriptor(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn get_own_property_descriptor( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.getOwnPropertyDescriptor( object, property )
Returns an object describing the configuration of a specific property on a given object.
More information:
sourcepub fn get_own_property_descriptors(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn get_own_property_descriptors( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.getOwnPropertyDescriptors( object )
Returns all own property descriptors of a given object.
More information:
sourcepub fn is(_: &JsValue, args: &[JsValue], _: &mut Context) -> JsResult<JsValue>
pub fn is(_: &JsValue, args: &[JsValue], _: &mut Context) -> JsResult<JsValue>
Uses the SameValue
algorithm to check equality of objects
sourcepub fn get_prototype_of(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn get_prototype_of( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Get the prototype
of an object.
sourcepub fn set_prototype_of(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn set_prototype_of( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Set the prototype
of an object.
sourcepub fn is_prototype_of(
this: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn is_prototype_of( this: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.prototype.isPrototypeOf( proto )
Check whether or not an object exists within another object’s prototype chain.
More information:
sourcepub fn define_property(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn define_property( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Define a property in an object
sourcepub fn define_properties(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn define_properties( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.defineProperties( proto, [propertiesObject] )
Creates or update own properties to the object
More information:
sourcepub fn to_string(
this: &JsValue,
_: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn to_string( this: &JsValue, _: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.prototype.toString()
This method returns a string representing the object.
More information:
sourcepub fn to_locale_string(
this: &JsValue,
_: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn to_locale_string( this: &JsValue, _: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.prototype.toLocaleString( [ reserved1 [ , reserved2 ] ] )
More information:
sourcepub fn has_own_property(
this: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn has_own_property( this: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.prototype.hasOwnProperty( property )
The method returns a boolean indicating whether the object has the specified property as its own property (as opposed to inheriting it).
More information:
sourcepub fn property_is_enumerable(
this: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn property_is_enumerable( this: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.prototype.propertyIsEnumerable( property )
This method returns a Boolean indicating whether the specified property is enumerable and is the object’s own property.
More information:
sourcepub fn assign(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn assign( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.assign( target, ...sources )
This method copies all enumerable own properties from one or more source objects to a target object. It returns the target object.
More information:
sourcepub fn keys(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn keys( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.keys( target )
This method returns an array of a given object’s own enumerable property names, iterated in the same order that a normal loop would.
More information:
sourcepub fn entries(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn entries( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Object.entries( target )
This method returns an array of a given object’s own enumerable string-keyed property [key, value] pairs. This is the same as iterating with a for…in loop, except that a for…in loop enumerates properties in the prototype chain as well).
More information:
sourcepub fn prevent_extensions(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn prevent_extensions( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
sourcepub fn is_extensible(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn is_extensible( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
sourcepub fn get_own_property_names(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn get_own_property_names( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
sourcepub fn get_own_property_symbols(
_: &JsValue,
args: &[JsValue],
context: &mut Context
) -> JsResult<JsValue>
pub fn get_own_property_symbols( _: &JsValue, args: &[JsValue], context: &mut Context ) -> JsResult<JsValue>
Trait Implementations§
source§impl Clone for OrdinaryObject
impl Clone for OrdinaryObject
source§fn clone(&self) -> OrdinaryObject
fn clone(&self) -> OrdinaryObject
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OrdinaryObject
impl Debug for OrdinaryObject
source§impl Default for OrdinaryObject
impl Default for OrdinaryObject
source§fn default() -> OrdinaryObject
fn default() -> OrdinaryObject
source§impl Trace for OrdinaryObjectwhere
Self: Copy,
impl Trace for OrdinaryObjectwhere
Self: Copy,
source§unsafe fn trace_non_roots(&self)
unsafe fn trace_non_roots(&self)
source§fn run_finalizer(&self)
fn run_finalizer(&self)
Finalize::finalize
on this object and all
contained subobjects.impl Copy for OrdinaryObject
impl JsData for OrdinaryObject
Auto Trait Implementations§
impl RefUnwindSafe for OrdinaryObject
impl Send for OrdinaryObject
impl Sync for OrdinaryObject
impl Unpin for OrdinaryObject
impl UnwindSafe for OrdinaryObject
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> NativeObject for T
impl<T> NativeObject for T
source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
NativeObject
to a &dyn Any
.source§fn as_mut_any(&mut self) -> &mut (dyn Any + 'static)
fn as_mut_any(&mut self) -> &mut (dyn Any + 'static)
NativeObject
to a &mut dyn Any
.source§fn type_name_of_value(&self) -> &'static str
fn type_name_of_value(&self) -> &'static str
source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.