Static JSPropertyDescriptorWritableKey

Source
pub unsafe static JSPropertyDescriptorWritableKey: Option<&'static NSString>
Available on crate features JSValue and objc2-foundation only.
Expand description

Property Descriptor Constants

These keys may assist in creating a property descriptor for use with the defineProperty method on JSValue. Property descriptors must fit one of three descriptions:

Data Descriptor:

  • A descriptor containing one or both of the keys value and writable , and optionally containing one or both of the keys enumerable and configurable . A data descriptor may not contain either the get or set key. A data descriptor may be used to create or modify the attributes of a data property on an object (replacing any existing accessor property).

Accessor Descriptor:

  • A descriptor containing one or both of the keys get and set , and optionally containing one or both of the keys enumerable and configurable . An accessor descriptor may not contain either the value or writable key. An accessor descriptor may be used to create or modify the attributes of an accessor property on an object (replacing any existing data property).

Generic Descriptor:

  • A descriptor containing one or both of the keys enumerable and configurable . A generic descriptor may not contain any of the keys value , writable , get , or set . A generic descriptor may be used to modify the attributes of an existing data or accessor property, or to create a new data property.

See also Apple’s documentation