[][src]Struct boa::syntax::ast::node::new::New

pub struct New { /* fields omitted */ }

The new operator lets developers create an instance of a user-defined object type or of one of the built-in object types that has a constructor function.

The new keyword does the following things:

  • Creates a blank, plain JavaScript object;
  • Links (sets the constructor of) this object to another object;
  • Passes the newly created object from Step 1 as the this context;
  • Returns this if the function doesn't return its own object.

More information:

Implementations

impl New[src]

pub fn expr(&self) -> &Node[src]

Gets the name of the function call.

pub fn args(&self) -> &[Node][src]

Retrieves the arguments passed to the function.

Trait Implementations

impl Clone for New[src]

impl Debug for New[src]

impl Display for New[src]

impl Drop for New[src]

impl Executable for New[src]

impl Finalize for New[src]

impl From<Call> for New[src]

impl From<New> for Node[src]

impl PartialEq<New> for New[src]

impl StructuralPartialEq for New[src]

impl Trace for New[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> NativeObject for T where
    T: Any + Debug + Trace
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,