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
sourceimpl Executable for New
impl Executable for New
sourceimpl Trace for New
impl Trace for New
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects Read more
impl StructuralPartialEq for New
Auto Trait Implementations
impl RefUnwindSafe for New
impl !Send for New
impl !Sync for New
impl Unpin for New
impl UnwindSafe for New
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more