pub struct JSPropertyAttributes {
pub read_only: bool,
pub dont_enum: bool,
pub dont_delete: bool,
}
Expand description
Attributes for JavaScript properties.
Used in JSObject::set_property
and JSObject::set_property_for_key
.
Fields§
§read_only: bool
Specifies that a property is read-only.
dont_enum: bool
Specifies that a property should not be enumerated by JSPropertyEnumerators
and JavaScript for...in
loops.
dont_delete: bool
Specifies that the delete operation should fail on a property.
Implementations§
Source§impl JSPropertyAttributes
impl JSPropertyAttributes
Trait Implementations§
Source§impl Clone for JSPropertyAttributes
impl Clone for JSPropertyAttributes
Source§fn clone(&self) -> JSPropertyAttributes
fn clone(&self) -> JSPropertyAttributes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JSPropertyAttributes
impl Debug for JSPropertyAttributes
Source§impl Default for JSPropertyAttributes
impl Default for JSPropertyAttributes
Source§fn default() -> JSPropertyAttributes
fn default() -> JSPropertyAttributes
Returns the “default value” for a type. Read more
Source§impl PartialEq for JSPropertyAttributes
impl PartialEq for JSPropertyAttributes
impl Copy for JSPropertyAttributes
impl Eq for JSPropertyAttributes
impl StructuralPartialEq for JSPropertyAttributes
Auto Trait Implementations§
impl Freeze for JSPropertyAttributes
impl RefUnwindSafe for JSPropertyAttributes
impl Send for JSPropertyAttributes
impl Sync for JSPropertyAttributes
impl Unpin for JSPropertyAttributes
impl UnwindSafe for JSPropertyAttributes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
Source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
Prepares an output buffer, then turns this buffer into an
Owned
.
User-provided closure F
must only write to and not read from &mut Self
.Source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
Source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
Source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.