[−][src]Enum boa::syntax::ast::node::PropertyDefinition
A JavaScript property is a characteristic of an object, often describing attributes associated with a data structure.
A property has a name (a string) and a value (primitive, method, or object reference). Note that when we say that "a property holds an object", that is shorthand for "a property holds an object reference". This distinction matters because the original referenced object remains unchanged when you change the property's value.
More information:
Variants
Binds a property name to a JavaScript value.
More information:
MethodDefinition(MethodDefinitionKind, Box<str>, FunctionExpr)
A property of an object can also refer to a function or a getter or setter method.
More information:
SpreadObject(Node)
The Rest/Spread Properties for ECMAScript proposal (stage 4) adds spread properties to object literals. It copies own enumerable properties from a provided object onto a new object.
Shallow-cloning (excluding prototype
) or merging objects is now possible using a shorter syntax than Object.assign()
.
More information:
Implementations
impl PropertyDefinition
[src]
pub fn identifier_reference<I>(ident: I) -> Self where
I: Into<Box<str>>,
[src]
I: Into<Box<str>>,
Creates an IdentifierReference
property definition.
pub fn property<N, V>(name: N, value: V) -> Self where
N: Into<Box<str>>,
V: Into<Node>,
[src]
N: Into<Box<str>>,
V: Into<Node>,
Creates a Property
definition.
pub fn method_definition<N>(
kind: MethodDefinitionKind,
name: N,
body: FunctionExpr
) -> Self where
N: Into<Box<str>>,
[src]
kind: MethodDefinitionKind,
name: N,
body: FunctionExpr
) -> Self where
N: Into<Box<str>>,
Creates a MethodDefinition
.
pub fn spread_object<O>(obj: O) -> Self where
O: Into<Node>,
[src]
O: Into<Node>,
Creates a SpreadObject
.
Trait Implementations
impl Clone for PropertyDefinition
[src]
fn clone(&self) -> PropertyDefinition
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PropertyDefinition
[src]
impl Drop for PropertyDefinition
[src]
impl Finalize for PropertyDefinition
[src]
impl PartialEq<PropertyDefinition> for PropertyDefinition
[src]
fn eq(&self, other: &PropertyDefinition) -> bool
[src]
fn ne(&self, other: &PropertyDefinition) -> bool
[src]
impl StructuralPartialEq for PropertyDefinition
[src]
impl Trace for PropertyDefinition
[src]
Auto Trait Implementations
impl RefUnwindSafe for PropertyDefinition
impl Send for PropertyDefinition
impl Sync for PropertyDefinition
impl Unpin for PropertyDefinition
impl UnwindSafe for PropertyDefinition
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,
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,
fn as_any(&Self) -> &(dyn Any + 'static)
[src]
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.
fn to_owned(&self) -> T
[src]
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.
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.
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>,