[−][src]Enum boa::syntax::ast::node::MethodDefinitionKind
Method definition kinds.
Starting with ECMAScript 2015, a shorter syntax for method definitions on objects initializers is introduced. It is a shorthand for a function assigned to the method's name.
More information:
Variants
The get
syntax binds an object property to a function that will be called when that property is looked up.
Sometimes it is desirable to allow access to a property that returns a dynamically computed value, or you may want to reflect the status of an internal variable without requiring the use of explicit method calls. In JavaScript, this can be accomplished with the use of a getter.
It is not possible to simultaneously have a getter bound to a property and have that property actually hold a value, although it is possible to use a getter and a setter in conjunction to create a type of pseudo-property.
More information:
The set
syntax binds an object property to a function to be called when there is an attempt to set that property.
In JavaScript, a setter can be used to execute a function whenever a specified property is attempted to be changed. Setters are most often used in conjunction with getters to create a type of pseudo-property. It is not possible to simultaneously have a setter on a property that holds an actual value.
More information:
Starting with ECMAScript 2015, you are able to define own methods in a shorter syntax, similar to the getters and setters.
More information:
Trait Implementations
impl Clone for MethodDefinitionKind
[src]
fn clone(&self) -> MethodDefinitionKind
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MethodDefinitionKind
[src]
impl Debug for MethodDefinitionKind
[src]
impl Finalize for MethodDefinitionKind
[src]
impl PartialEq<MethodDefinitionKind> for MethodDefinitionKind
[src]
fn eq(&self, other: &MethodDefinitionKind) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for MethodDefinitionKind
[src]
impl Trace for MethodDefinitionKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for MethodDefinitionKind
impl Send for MethodDefinitionKind
impl Sync for MethodDefinitionKind
impl Unpin for MethodDefinitionKind
impl UnwindSafe for MethodDefinitionKind
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>,