[][src]Struct boa::property::AccessorDescriptor

pub struct AccessorDescriptor { /* fields omitted */ }

An accessor descriptor is a property described by a getter-setter pair of functions.

More information:

Implementations

impl AccessorDescriptor[src]

pub fn new(
    get: Option<GcObject>,
    set: Option<GcObject>,
    mut attributes: Attribute
) -> Self
[src]

Create a new AccessorDescriptor.

If the attributes argument contains a writable flag, it will be removed so only enumerable and configurable remains.

pub fn getter(&self) -> Option<&GcObject>[src]

Return the getter if it exists.

pub fn setter(&self) -> Option<&GcObject>[src]

Return the setter if it exists.

pub fn set_getter(&mut self, get: Option<GcObject>)[src]

Set the getter of the accessor descriptor.

pub fn set_setter(&mut self, set: Option<GcObject>)[src]

Set the setter of the accessor descriptor.

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

Return the attributes of the accessor descriptor.

It is guaranteed to not contain a writable flag

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

Check whether the descriptor is configurable.

pub fn set_configurable(&mut self, configurable: bool)[src]

Set whether the descriptor is configurable.

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

Check whether the descriptor is enumerable.

pub fn set_enumerable(&mut self, enumerable: bool)[src]

Set whether the descriptor is enumerable.

Trait Implementations

impl Clone for AccessorDescriptor[src]

impl Debug for AccessorDescriptor[src]

impl Drop for AccessorDescriptor[src]

impl Finalize for AccessorDescriptor[src]

impl From<AccessorDescriptor> for PropertyDescriptor[src]

impl Trace for AccessorDescriptor[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>,