pub struct DescriptorFields {
pub value: bool,
pub writable: bool,
pub enumerable: bool,
pub configurable: bool,
pub get: bool,
pub set: bool,
}Expand description
Which fields of a Property a descriptor names.
Fields§
§value: bool[[Value]] is named.
writable: bool[[Writable]] is named.
enumerable: bool[[Enumerable]] is named.
configurable: bool[[Configurable]] is named.
get: bool[[Get]] is named.
Needed to know that the descriptor is an accessor one. Without it, forwarding a
partial {set: f} to a target that owns a data property merged the generic fields
and dropped the accessor half entirely, so Object.defineProperty(new Proxy(function(){}, {}), "prototype", {set: f}) reported success where the same
call on the function itself refuses — and the proxy is required to refuse too.
set: bool[[Set]] is named. See DescriptorFields::get.
Trait Implementations§
Source§impl Clone for DescriptorFields
impl Clone for DescriptorFields
impl Copy for DescriptorFields
Source§impl Default for DescriptorFields
impl Default for DescriptorFields
impl Eq for DescriptorFields
Source§impl PartialEq for DescriptorFields
impl PartialEq for DescriptorFields
impl StructuralPartialEq for DescriptorFields
Auto Trait Implementations§
impl Forget for DescriptorFields
impl Freeze for DescriptorFields
impl Move for DescriptorFields
impl RefUnwindSafe for DescriptorFields
impl Send for DescriptorFields
impl Sync for DescriptorFields
impl Unpin for DescriptorFields
impl UnsafeUnpin for DescriptorFields
impl UnwindSafe for DescriptorFields
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
Mutably borrows from an owned value. Read more