[−][src]Struct boa::syntax::ast::node::new::New
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
impl RefUnwindSafe for New
[src]
impl Send for New
[src]
impl Sync for New
[src]
impl Unpin for New
[src]
impl UnwindSafe for New
[src]
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,
pub 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,
pub fn as_any(&Self) -> &(dyn Any + 'static)
[src]
pub 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.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
pub 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.
pub 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>,