Skip to main content

PropertyAttribute

Struct PropertyAttribute 

Source
pub struct PropertyAttribute(/* private fields */);

Implementations§

Source§

impl PropertyAttribute

Source

pub const NONE: PropertyAttribute

No property attributes.

Source

pub const READ_ONLY: PropertyAttribute

Not writable. Corresponds to Object.defineProperty(o, "p", { writable: false }).

Source

pub const DONT_ENUM: PropertyAttribute

Not enumerable. Corresponds to Object.defineProperty(o, "p", { enumerable: false }).

Source

pub const DONT_DELETE: PropertyAttribute

Not configurable. Corresponds to Object.defineProperty(o, "p", { configurable: false }).

Source

pub fn is_none(&self) -> bool

Test if no property attributes are set.

Source

pub fn is_read_only(&self) -> bool

Test if the read-only property attribute is set.

Source

pub fn is_dont_enum(&self) -> bool

Test if the non-enumerable property attribute is set.

Source

pub fn is_dont_delete(&self) -> bool

Test if the non-configurable property attribute is set.

Source

pub fn as_u32(&self) -> u32

Trait Implementations§

Source§

impl BitOr for PropertyAttribute

Source§

type Output = PropertyAttribute

The resulting type after applying the | operator.
Source§

fn bitor(self, _: PropertyAttribute) -> PropertyAttribute

Performs the | operation. Read more
Source§

impl Debug for PropertyAttribute

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for PropertyAttribute

Source§

fn default() -> PropertyAttribute

Returns the “default value” for a type. Read more
Source§

impl Eq for PropertyAttribute

Source§

impl PartialEq for PropertyAttribute

Source§

fn eq(&self, other: &PropertyAttribute) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PropertyAttribute

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.