[][src]Enum boa::property::PropertyDescriptor

pub enum PropertyDescriptor {
    Accessor(AccessorDescriptor),
    Data(DataDescriptor),
}

This represents a JavaScript Property AKA The Property Descriptor.

Property descriptors present in objects come in two main flavors:

  • data descriptors
  • accessor descriptors

A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter pair of functions. A descriptor must be one of these two flavors; it cannot be both.

More information:

Variants

Implementations

impl PropertyDescriptor[src]

pub fn is_accessor_descriptor(&self) -> bool[src]

An accessor Property Descriptor is one that includes any fields named either [[Get]] or [[Set]].

More information:

pub fn as_accessor_descriptor(&self) -> Option<&AccessorDescriptor>[src]

Return Some() if it is a accessor descriptor, None otherwise.

pub fn is_data_descriptor(&self) -> bool[src]

A data Property Descriptor is one that includes any fields named either [[Value]] or [[Writable]].

More information:

pub fn as_data_descriptor(&self) -> Option<&DataDescriptor>[src]

Return Some() if it is a data descriptor, None otherwise.

pub fn enumerable(&self) -> bool[src]

Check whether the descriptor is enumerable.

pub fn configurable(&self) -> bool[src]

Check whether the descriptor is configurable.

pub fn attributes(&self) -> Attribute[src]

Return the attributes of the descriptor.

Trait Implementations

impl Clone for PropertyDescriptor[src]

impl Debug for PropertyDescriptor[src]

impl Drop for PropertyDescriptor[src]

impl Finalize for PropertyDescriptor[src]

impl From<AccessorDescriptor> for PropertyDescriptor[src]

impl From<DataDescriptor> for PropertyDescriptor[src]

impl Trace for PropertyDescriptor[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> NativeObject for T where
    T: Any + Debug + Trace
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,