[−][src]Struct boa::property::AccessorDescriptor
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]
get: Option<GcObject>,
set: Option<GcObject>,
mut attributes: Attribute
) -> Self
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]
pub fn clone(&self) -> AccessorDescriptor[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for AccessorDescriptor[src]
impl Drop for AccessorDescriptor[src]
impl Finalize for AccessorDescriptor[src]
impl From<AccessorDescriptor> for PropertyDescriptor[src]
pub fn from(value: AccessorDescriptor) -> Self[src]
impl Trace for AccessorDescriptor[src]
Auto Trait Implementations
impl !RefUnwindSafe for AccessorDescriptor[src]
impl !Send for AccessorDescriptor[src]
impl !Sync for AccessorDescriptor[src]
impl Unpin for AccessorDescriptor[src]
impl !UnwindSafe for AccessorDescriptor[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> NativeObject for T where
T: Any + Debug + Trace, [src]
T: Any + Debug + Trace,
pub fn as_any(&Self) -> &(dyn Any + 'static)[src]
pub fn as_mut_any(&mut Self) -> &mut (dyn Any + 'static)[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,