pub struct PropertyDescriptor<'a> { /* private fields */ }Expand description
Object property descriptor.
Implementations§
Source§impl<'a> PropertyDescriptor<'a>
impl<'a> PropertyDescriptor<'a>
Sourcepub fn builder(
name: impl Into<Cow<'a, str>>,
configurable: bool,
enumerable: bool,
) -> PropertyDescriptorBuilder<'a>
pub fn builder( name: impl Into<Cow<'a, str>>, configurable: bool, enumerable: bool, ) -> PropertyDescriptorBuilder<'a>
Creates a builder for this type with the required parameters:
name: Property name or symbol description.configurable: True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.enumerable: True if this property shows up during enumeration of the properties on the corresponding object.
Sourcepub fn value(&self) -> Option<&RemoteObject<'a>>
pub fn value(&self) -> Option<&RemoteObject<'a>>
The value associated with the property.
Sourcepub fn writable(&self) -> Option<bool>
pub fn writable(&self) -> Option<bool>
True if the value associated with the property may be changed (data descriptors only).
Sourcepub fn get(&self) -> Option<&RemoteObject<'a>>
pub fn get(&self) -> Option<&RemoteObject<'a>>
A function which serves as a getter for the property, or ‘undefined’ if there is no getter (accessor descriptors only).
Sourcepub fn set(&self) -> Option<&RemoteObject<'a>>
pub fn set(&self) -> Option<&RemoteObject<'a>>
A function which serves as a setter for the property, or ‘undefined’ if there is no setter (accessor descriptors only).
Sourcepub fn configurable(&self) -> bool
pub fn configurable(&self) -> bool
True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
Sourcepub fn enumerable(&self) -> bool
pub fn enumerable(&self) -> bool
True if this property shows up during enumeration of the properties on the corresponding object.
Sourcepub fn was_thrown(&self) -> Option<bool>
pub fn was_thrown(&self) -> Option<bool>
True if the result was thrown during the evaluation.
Sourcepub fn symbol(&self) -> Option<&RemoteObject<'a>>
pub fn symbol(&self) -> Option<&RemoteObject<'a>>
Property symbol object, if the property is of the ‘symbol’ type.
Trait Implementations§
Source§impl<'a> Clone for PropertyDescriptor<'a>
impl<'a> Clone for PropertyDescriptor<'a>
Source§fn clone(&self) -> PropertyDescriptor<'a>
fn clone(&self) -> PropertyDescriptor<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more