pub struct New { /* private fields */ }Expand description
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§
Trait Implementations§
Source§impl Executable for New
impl Executable for New
Source§impl Trace for New
impl Trace for New
Source§fn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects
impl StructuralPartialEq for New
Auto Trait Implementations§
impl Freeze for New
impl RefUnwindSafe for New
impl !Send for New
impl !Sync for New
impl Unpin for New
impl UnwindSafe for New
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more