pub enum Node {
Show 44 variants
ArrayDecl(ArrayDecl),
ArrowFunctionDecl(ArrowFunctionDecl),
Assign(Assign),
AsyncFunctionDecl(AsyncFunctionDecl),
AsyncFunctionExpr(AsyncFunctionExpr),
AsyncGeneratorExpr(AsyncGeneratorExpr),
AsyncGeneratorDecl(AsyncGeneratorDecl),
AwaitExpr(AwaitExpr),
BinOp(BinOp),
Block(Block),
Break(Break),
Call(Call),
ConditionalOp(ConditionalOp),
Const(Const),
ConstDeclList(DeclarationList),
Continue(Continue),
DoWhileLoop(DoWhileLoop),
FunctionDecl(FunctionDecl),
FunctionExpr(FunctionExpr),
GetConstField(GetConstField),
GetField(GetField),
ForLoop(ForLoop),
ForInLoop(ForInLoop),
ForOfLoop(ForOfLoop),
If(If),
LetDeclList(DeclarationList),
Identifier(Identifier),
New(New),
Object(Object),
Return(Return),
Switch(Switch),
Spread(Spread),
TaggedTemplate(Box<TaggedTemplate>),
TemplateLit(TemplateLit),
Throw(Throw),
Try(Box<Try>),
This,
UnaryOp(UnaryOp),
VarDeclList(DeclarationList),
WhileLoop(WhileLoop),
Empty,
Yield(Yield),
GeneratorDecl(GeneratorDecl),
GeneratorExpr(GeneratorExpr),
}
Variants
ArrayDecl(ArrayDecl)
Array declaration node. More information.
ArrowFunctionDecl(ArrowFunctionDecl)
An arrow function expression node. More information.
Assign(Assign)
An assignment operator node. More information.
AsyncFunctionDecl(AsyncFunctionDecl)
An async function declaration node. More information.
AsyncFunctionExpr(AsyncFunctionExpr)
An async function expression node. More information.
AsyncGeneratorExpr(AsyncGeneratorExpr)
An async generator expression node.
AsyncGeneratorDecl(AsyncGeneratorDecl)
An async generator declaration node.
AwaitExpr(AwaitExpr)
An await expression node. More information.
BinOp(BinOp)
A binary operator node. More information.
Block(Block)
A Block node. More information.
Break(Break)
A break node. More information.
Call(Call)
A function call. More information.
ConditionalOp(ConditionalOp)
A javascript conditional operand ( x ? y : z ). More information.
Const(Const)
Literals represent values in JavaScript.
These are fixed values not variables that you literally provide in your script.
More information:
ConstDeclList(DeclarationList)
A constant declaration list. More information.
Continue(Continue)
A continue statement. More information.
DoWhileLoop(DoWhileLoop)
A do … while statement. More information.
FunctionDecl(FunctionDecl)
A function declaration node. More information.
FunctionExpr(FunctionExpr)
A function expression node. More information.
GetConstField(GetConstField)
Provides access to an object types’ constant properties. More information.
GetField(GetField)
Provides access to object fields. More information.
ForLoop(ForLoop)
A for
statement. More information.
ForInLoop(ForInLoop)
A for...of
or for..in
statement. More information.
ForOfLoop(ForOfLoop)
A for...of
statement. More information.
If(If)
An ‘if’ statement. More information.
LetDeclList(DeclarationList)
A let
declaration list. More information.
Identifier(Identifier)
A local identifier node. More information.
New(New)
A new
expression. More information.
Object(Object)
An object. More information.
Return(Return)
A return statement. More information.
Switch(Switch)
A switch {case} statement. More information.
Spread(Spread)
A spread (…x) statement. More information.
TaggedTemplate(Box<TaggedTemplate>)
A tagged template. More information.
TemplateLit(TemplateLit)
A template literal. More information.
Throw(Throw)
A throw statement. More information.
Try(Box<Try>)
A try...catch
node. More information.
This
The JavaScript this
keyword refers to the object it belongs to.
A property of an execution context (global, function or eval) that, in non–strict mode, is always a reference to an object and in strict mode can be any value.
More information:
UnaryOp(UnaryOp)
Unary operation node. More information
VarDeclList(DeclarationList)
Array declaration node. More information.
WhileLoop(WhileLoop)
A ‘while {…}’ node. More information.
Empty
A empty node.
Empty statement do nothing, just return undefined.
More information:
Yield(Yield)
A yield
node. More information.
GeneratorDecl(GeneratorDecl)
A generator function declaration node. More information.
GeneratorExpr(GeneratorExpr)
A generator function expression node. More information.
Implementations
Trait Implementations
sourceimpl From<ArrowFunctionDecl> for Node
impl From<ArrowFunctionDecl> for Node
sourcefn from(decl: ArrowFunctionDecl) -> Self
fn from(decl: ArrowFunctionDecl) -> Self
Performs the conversion.
sourceimpl From<AsyncFunctionDecl> for Node
impl From<AsyncFunctionDecl> for Node
sourcefn from(decl: AsyncFunctionDecl) -> Self
fn from(decl: AsyncFunctionDecl) -> Self
Performs the conversion.
sourceimpl From<AsyncFunctionExpr> for Node
impl From<AsyncFunctionExpr> for Node
sourcefn from(expr: AsyncFunctionExpr) -> Self
fn from(expr: AsyncFunctionExpr) -> Self
Performs the conversion.
sourceimpl From<AsyncGeneratorDecl> for Node
impl From<AsyncGeneratorDecl> for Node
sourcefn from(decl: AsyncGeneratorDecl) -> Self
fn from(decl: AsyncGeneratorDecl) -> Self
Performs the conversion.
sourceimpl From<AsyncGeneratorExpr> for Node
impl From<AsyncGeneratorExpr> for Node
sourcefn from(expr: AsyncGeneratorExpr) -> Self
fn from(expr: AsyncGeneratorExpr) -> Self
Performs the conversion.
sourceimpl From<ConditionalOp> for Node
impl From<ConditionalOp> for Node
sourcefn from(cond_op: ConditionalOp) -> Self
fn from(cond_op: ConditionalOp) -> Self
Performs the conversion.
sourceimpl From<DeclarationList> for Node
impl From<DeclarationList> for Node
sourcefn from(list: DeclarationList) -> Self
fn from(list: DeclarationList) -> Self
Performs the conversion.
sourceimpl From<DoWhileLoop> for Node
impl From<DoWhileLoop> for Node
sourcefn from(do_while: DoWhileLoop) -> Self
fn from(do_while: DoWhileLoop) -> Self
Performs the conversion.
sourceimpl From<FunctionDecl> for Node
impl From<FunctionDecl> for Node
sourcefn from(decl: FunctionDecl) -> Self
fn from(decl: FunctionDecl) -> Self
Performs the conversion.
sourceimpl From<FunctionExpr> for Node
impl From<FunctionExpr> for Node
sourcefn from(expr: FunctionExpr) -> Self
fn from(expr: FunctionExpr) -> Self
Performs the conversion.
sourceimpl From<GeneratorDecl> for Node
impl From<GeneratorDecl> for Node
sourcefn from(decl: GeneratorDecl) -> Self
fn from(decl: GeneratorDecl) -> Self
Performs the conversion.
sourceimpl From<GeneratorExpr> for Node
impl From<GeneratorExpr> for Node
sourcefn from(expr: GeneratorExpr) -> Self
fn from(expr: GeneratorExpr) -> Self
Performs the conversion.
sourceimpl From<GetConstField> for Node
impl From<GetConstField> for Node
sourcefn from(get_const_field: GetConstField) -> Self
fn from(get_const_field: GetConstField) -> Self
Performs the conversion.
sourceimpl From<Identifier> for Node
impl From<Identifier> for Node
sourcefn from(local: Identifier) -> Self
fn from(local: Identifier) -> Self
Performs the conversion.
sourceimpl From<TaggedTemplate> for Node
impl From<TaggedTemplate> for Node
sourcefn from(template: TaggedTemplate) -> Self
fn from(template: TaggedTemplate) -> Self
Performs the conversion.
sourceimpl ToInternedString for Node
impl ToInternedString for Node
sourcefn to_interned_string(&self, interner: &Interner) -> String
fn to_interned_string(&self, interner: &Interner) -> String
Converts a given element to a string using an interner.
sourceimpl Trace for Node
impl Trace for Node
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all contained subobjects Read more
impl StructuralPartialEq for Node
Auto Trait Implementations
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> NativeObject for T where
T: Any + Debug + Trace,
impl<T> NativeObject for T where
T: Any + Debug + Trace,
sourceimpl<T> Pipe for T where
T: ?Sized,
impl<T> Pipe for T where
T: ?Sized,
sourcefn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
Pipes by value. This is generally the method you want to use. Read more
sourcefn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
Borrows self
and passes that borrow into the pipe function. Read more
sourcefn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
Mutably borrows self
and passes that borrow into the pipe function. Read more
sourcefn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.borrow()
into the pipe function. Read more
sourcefn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
Mutably borrows self
, then passes self.borrow_mut()
into the pipe
function. Read more
sourcefn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.as_ref()
into the pipe function.
sourcefn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
Mutably borrows self
, then passes self.as_mut()
into the pipe
function. Read more
sourceimpl<T> Tap for T
impl<T> Tap for T
sourcefn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Immutable access to the Borrow<B>
of a value. Read more
sourcefn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Mutable access to the BorrowMut<B>
of a value. Read more
sourcefn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Immutable access to the AsRef<R>
view of a value. Read more
sourcefn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Mutable access to the AsMut<R>
view of a value. Read more
sourcefn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Immutable access to the Deref::Target
of a value. Read more
sourcefn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Mutable access to the Deref::Target
of a value. Read more
sourcefn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls .tap()
only in debug builds, and is erased in release builds.
sourcefn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls .tap_mut()
only in debug builds, and is erased in release
builds. Read more
sourcefn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Calls .tap_borrow()
only in debug builds, and is erased in release
builds. Read more
sourcefn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Calls .tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read more
sourcefn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Calls .tap_ref()
only in debug builds, and is erased in release
builds. Read more
sourcefn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Calls .tap_ref_mut()
only in debug builds, and is erased in release
builds. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more