Enum Expr
pub enum Expr {
Show 38 variants
This(ThisExpr),
Array(ArrayLit),
Object(ObjectLit),
Fn(FnExpr),
Unary(UnaryExpr),
Update(UpdateExpr),
Bin(BinExpr),
Assign(AssignExpr),
Member(MemberExpr),
SuperProp(SuperPropExpr),
Cond(CondExpr),
Call(CallExpr),
New(NewExpr),
Seq(SeqExpr),
Ident(Ident),
Lit(Lit),
Tpl(Tpl),
TaggedTpl(TaggedTpl),
Arrow(ArrowExpr),
Class(ClassExpr),
Yield(YieldExpr),
MetaProp(MetaPropExpr),
Await(AwaitExpr),
Paren(ParenExpr),
JSXMember(JSXMemberExpr),
JSXNamespacedName(JSXNamespacedName),
JSXEmpty(JSXEmptyExpr),
JSXElement(Box<JSXElement>),
JSXFragment(JSXFragment),
TsTypeAssertion(TsTypeAssertion),
TsConstAssertion(TsConstAssertion),
TsNonNull(TsNonNullExpr),
TsAs(TsAsExpr),
TsInstantiation(TsInstantiation),
TsSatisfies(TsSatisfiesExpr),
PrivateName(PrivateName),
OptChain(OptChainExpr),
Invalid(Invalid),
}
__ecma
and __utils
only.Variants§
This(ThisExpr)
Array(ArrayLit)
Object(ObjectLit)
Fn(FnExpr)
Unary(UnaryExpr)
Update(UpdateExpr)
++v
, --v
, v++
, v--
Bin(BinExpr)
Assign(AssignExpr)
Member(MemberExpr)
A member expression. If computed is true, the node corresponds to a computed (a[b]) member expression and property is an Expression. If computed is false, the node corresponds to a static (a.b) member expression and property is an Identifier.
SuperProp(SuperPropExpr)
Cond(CondExpr)
true ? ‘a’ : ‘b’
Call(CallExpr)
New(NewExpr)
new Cat()
Seq(SeqExpr)
Ident(Ident)
Lit(Lit)
Tpl(Tpl)
TaggedTpl(TaggedTpl)
Arrow(ArrowExpr)
Class(ClassExpr)
Yield(YieldExpr)
MetaProp(MetaPropExpr)
Await(AwaitExpr)
Paren(ParenExpr)
JSXMember(JSXMemberExpr)
JSXNamespacedName(JSXNamespacedName)
JSXEmpty(JSXEmptyExpr)
JSXElement(Box<JSXElement>)
JSXFragment(JSXFragment)
TsTypeAssertion(TsTypeAssertion)
TsConstAssertion(TsConstAssertion)
TsNonNull(TsNonNullExpr)
TsAs(TsAsExpr)
TsInstantiation(TsInstantiation)
TsSatisfies(TsSatisfiesExpr)
PrivateName(PrivateName)
OptChain(OptChainExpr)
Invalid(Invalid)
Implementations§
§impl Expr
impl Expr
pub const fn is_this(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_this(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant This
.
pub fn as_this(&self) -> Option<&ThisExpr>
Available on crate feature ecma_ast
only.
pub fn as_this(&self) -> Option<&ThisExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant This
, and None
otherwise.
pub fn as_mut_this(&mut self) -> Option<&mut ThisExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_this(&mut self) -> Option<&mut ThisExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant This
, and None
otherwise.
pub fn expect_this(self) -> ThisExpr
Available on crate feature ecma_ast
only.
pub fn expect_this(self) -> ThisExpr
ecma_ast
only.pub fn this(self) -> Option<ThisExpr>
Available on crate feature ecma_ast
only.
pub fn this(self) -> Option<ThisExpr>
ecma_ast
only.Returns Some
if self
is of variant This
, and None
otherwise.
pub const fn is_array(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_array(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Array
.
pub fn as_array(&self) -> Option<&ArrayLit>
Available on crate feature ecma_ast
only.
pub fn as_array(&self) -> Option<&ArrayLit>
ecma_ast
only.Returns Some
if self
is a reference of variant Array
, and None
otherwise.
pub fn as_mut_array(&mut self) -> Option<&mut ArrayLit>
Available on crate feature ecma_ast
only.
pub fn as_mut_array(&mut self) -> Option<&mut ArrayLit>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Array
, and None
otherwise.
pub fn expect_array(self) -> ArrayLit
Available on crate feature ecma_ast
only.
pub fn expect_array(self) -> ArrayLit
ecma_ast
only.pub fn array(self) -> Option<ArrayLit>
Available on crate feature ecma_ast
only.
pub fn array(self) -> Option<ArrayLit>
ecma_ast
only.Returns Some
if self
is of variant Array
, and None
otherwise.
pub const fn is_object(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_object(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Object
.
pub fn as_object(&self) -> Option<&ObjectLit>
Available on crate feature ecma_ast
only.
pub fn as_object(&self) -> Option<&ObjectLit>
ecma_ast
only.Returns Some
if self
is a reference of variant Object
, and None
otherwise.
pub fn as_mut_object(&mut self) -> Option<&mut ObjectLit>
Available on crate feature ecma_ast
only.
pub fn as_mut_object(&mut self) -> Option<&mut ObjectLit>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Object
, and None
otherwise.
pub fn expect_object(self) -> ObjectLit
Available on crate feature ecma_ast
only.
pub fn expect_object(self) -> ObjectLit
ecma_ast
only.pub fn object(self) -> Option<ObjectLit>
Available on crate feature ecma_ast
only.
pub fn object(self) -> Option<ObjectLit>
ecma_ast
only.Returns Some
if self
is of variant Object
, and None
otherwise.
pub const fn is_fn_expr(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_fn_expr(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Fn
.
pub fn as_fn_expr(&self) -> Option<&FnExpr>
Available on crate feature ecma_ast
only.
pub fn as_fn_expr(&self) -> Option<&FnExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Fn
, and None
otherwise.
pub fn as_mut_fn_expr(&mut self) -> Option<&mut FnExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_fn_expr(&mut self) -> Option<&mut FnExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Fn
, and None
otherwise.
pub fn expect_fn_expr(self) -> FnExpr
Available on crate feature ecma_ast
only.
pub fn expect_fn_expr(self) -> FnExpr
ecma_ast
only.pub fn fn_expr(self) -> Option<FnExpr>
Available on crate feature ecma_ast
only.
pub fn fn_expr(self) -> Option<FnExpr>
ecma_ast
only.Returns Some
if self
is of variant Fn
, and None
otherwise.
pub const fn is_unary(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_unary(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Unary
.
pub fn as_unary(&self) -> Option<&UnaryExpr>
Available on crate feature ecma_ast
only.
pub fn as_unary(&self) -> Option<&UnaryExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Unary
, and None
otherwise.
pub fn as_mut_unary(&mut self) -> Option<&mut UnaryExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_unary(&mut self) -> Option<&mut UnaryExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Unary
, and None
otherwise.
pub fn expect_unary(self) -> UnaryExpr
Available on crate feature ecma_ast
only.
pub fn expect_unary(self) -> UnaryExpr
ecma_ast
only.pub fn unary(self) -> Option<UnaryExpr>
Available on crate feature ecma_ast
only.
pub fn unary(self) -> Option<UnaryExpr>
ecma_ast
only.Returns Some
if self
is of variant Unary
, and None
otherwise.
pub const fn is_update(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_update(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Update
.
pub fn as_update(&self) -> Option<&UpdateExpr>
Available on crate feature ecma_ast
only.
pub fn as_update(&self) -> Option<&UpdateExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Update
, and None
otherwise.
pub fn as_mut_update(&mut self) -> Option<&mut UpdateExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_update(&mut self) -> Option<&mut UpdateExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Update
, and None
otherwise.
pub fn expect_update(self) -> UpdateExpr
Available on crate feature ecma_ast
only.
pub fn expect_update(self) -> UpdateExpr
ecma_ast
only.pub fn update(self) -> Option<UpdateExpr>
Available on crate feature ecma_ast
only.
pub fn update(self) -> Option<UpdateExpr>
ecma_ast
only.Returns Some
if self
is of variant Update
, and None
otherwise.
pub const fn is_bin(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_bin(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Bin
.
pub fn as_bin(&self) -> Option<&BinExpr>
Available on crate feature ecma_ast
only.
pub fn as_bin(&self) -> Option<&BinExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Bin
, and None
otherwise.
pub fn as_mut_bin(&mut self) -> Option<&mut BinExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_bin(&mut self) -> Option<&mut BinExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Bin
, and None
otherwise.
pub fn expect_bin(self) -> BinExpr
Available on crate feature ecma_ast
only.
pub fn expect_bin(self) -> BinExpr
ecma_ast
only.pub fn bin(self) -> Option<BinExpr>
Available on crate feature ecma_ast
only.
pub fn bin(self) -> Option<BinExpr>
ecma_ast
only.Returns Some
if self
is of variant Bin
, and None
otherwise.
pub const fn is_assign(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_assign(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Assign
.
pub fn as_assign(&self) -> Option<&AssignExpr>
Available on crate feature ecma_ast
only.
pub fn as_assign(&self) -> Option<&AssignExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Assign
, and None
otherwise.
pub fn as_mut_assign(&mut self) -> Option<&mut AssignExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_assign(&mut self) -> Option<&mut AssignExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Assign
, and None
otherwise.
pub fn expect_assign(self) -> AssignExpr
Available on crate feature ecma_ast
only.
pub fn expect_assign(self) -> AssignExpr
ecma_ast
only.pub fn assign(self) -> Option<AssignExpr>
Available on crate feature ecma_ast
only.
pub fn assign(self) -> Option<AssignExpr>
ecma_ast
only.Returns Some
if self
is of variant Assign
, and None
otherwise.
pub const fn is_member(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_member(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Member
.
pub fn as_member(&self) -> Option<&MemberExpr>
Available on crate feature ecma_ast
only.
pub fn as_member(&self) -> Option<&MemberExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Member
, and None
otherwise.
pub fn as_mut_member(&mut self) -> Option<&mut MemberExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_member(&mut self) -> Option<&mut MemberExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Member
, and None
otherwise.
pub fn expect_member(self) -> MemberExpr
Available on crate feature ecma_ast
only.
pub fn expect_member(self) -> MemberExpr
ecma_ast
only.pub fn member(self) -> Option<MemberExpr>
Available on crate feature ecma_ast
only.
pub fn member(self) -> Option<MemberExpr>
ecma_ast
only.Returns Some
if self
is of variant Member
, and None
otherwise.
pub const fn is_super_prop(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_super_prop(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant SuperProp
.
pub fn as_super_prop(&self) -> Option<&SuperPropExpr>
Available on crate feature ecma_ast
only.
pub fn as_super_prop(&self) -> Option<&SuperPropExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant SuperProp
, and None
otherwise.
pub fn as_mut_super_prop(&mut self) -> Option<&mut SuperPropExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_super_prop(&mut self) -> Option<&mut SuperPropExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant SuperProp
, and None
otherwise.
pub fn expect_super_prop(self) -> SuperPropExpr
Available on crate feature ecma_ast
only.
pub fn expect_super_prop(self) -> SuperPropExpr
ecma_ast
only.pub fn super_prop(self) -> Option<SuperPropExpr>
Available on crate feature ecma_ast
only.
pub fn super_prop(self) -> Option<SuperPropExpr>
ecma_ast
only.Returns Some
if self
is of variant SuperProp
, and None
otherwise.
pub const fn is_cond(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_cond(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Cond
.
pub fn as_cond(&self) -> Option<&CondExpr>
Available on crate feature ecma_ast
only.
pub fn as_cond(&self) -> Option<&CondExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Cond
, and None
otherwise.
pub fn as_mut_cond(&mut self) -> Option<&mut CondExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_cond(&mut self) -> Option<&mut CondExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Cond
, and None
otherwise.
pub fn expect_cond(self) -> CondExpr
Available on crate feature ecma_ast
only.
pub fn expect_cond(self) -> CondExpr
ecma_ast
only.pub fn cond(self) -> Option<CondExpr>
Available on crate feature ecma_ast
only.
pub fn cond(self) -> Option<CondExpr>
ecma_ast
only.Returns Some
if self
is of variant Cond
, and None
otherwise.
pub const fn is_call(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_call(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Call
.
pub fn as_call(&self) -> Option<&CallExpr>
Available on crate feature ecma_ast
only.
pub fn as_call(&self) -> Option<&CallExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Call
, and None
otherwise.
pub fn as_mut_call(&mut self) -> Option<&mut CallExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_call(&mut self) -> Option<&mut CallExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Call
, and None
otherwise.
pub fn expect_call(self) -> CallExpr
Available on crate feature ecma_ast
only.
pub fn expect_call(self) -> CallExpr
ecma_ast
only.pub fn call(self) -> Option<CallExpr>
Available on crate feature ecma_ast
only.
pub fn call(self) -> Option<CallExpr>
ecma_ast
only.Returns Some
if self
is of variant Call
, and None
otherwise.
pub const fn is_new(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_new(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant New
.
pub fn as_new(&self) -> Option<&NewExpr>
Available on crate feature ecma_ast
only.
pub fn as_new(&self) -> Option<&NewExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant New
, and None
otherwise.
pub fn as_mut_new(&mut self) -> Option<&mut NewExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_new(&mut self) -> Option<&mut NewExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant New
, and None
otherwise.
pub fn expect_new(self) -> NewExpr
Available on crate feature ecma_ast
only.
pub fn expect_new(self) -> NewExpr
ecma_ast
only.pub fn new(self) -> Option<NewExpr>
Available on crate feature ecma_ast
only.
pub fn new(self) -> Option<NewExpr>
ecma_ast
only.Returns Some
if self
is of variant New
, and None
otherwise.
pub const fn is_seq(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_seq(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Seq
.
pub fn as_seq(&self) -> Option<&SeqExpr>
Available on crate feature ecma_ast
only.
pub fn as_seq(&self) -> Option<&SeqExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Seq
, and None
otherwise.
pub fn as_mut_seq(&mut self) -> Option<&mut SeqExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_seq(&mut self) -> Option<&mut SeqExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Seq
, and None
otherwise.
pub fn expect_seq(self) -> SeqExpr
Available on crate feature ecma_ast
only.
pub fn expect_seq(self) -> SeqExpr
ecma_ast
only.pub fn seq(self) -> Option<SeqExpr>
Available on crate feature ecma_ast
only.
pub fn seq(self) -> Option<SeqExpr>
ecma_ast
only.Returns Some
if self
is of variant Seq
, and None
otherwise.
pub const fn is_ident(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_ident(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Ident
.
pub fn as_ident(&self) -> Option<&Ident>
Available on crate feature ecma_ast
only.
pub fn as_ident(&self) -> Option<&Ident>
ecma_ast
only.Returns Some
if self
is a reference of variant Ident
, and None
otherwise.
pub fn as_mut_ident(&mut self) -> Option<&mut Ident>
Available on crate feature ecma_ast
only.
pub fn as_mut_ident(&mut self) -> Option<&mut Ident>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Ident
, and None
otherwise.
pub fn expect_ident(self) -> Ident
Available on crate feature ecma_ast
only.
pub fn expect_ident(self) -> Ident
ecma_ast
only.pub fn ident(self) -> Option<Ident>
Available on crate feature ecma_ast
only.
pub fn ident(self) -> Option<Ident>
ecma_ast
only.Returns Some
if self
is of variant Ident
, and None
otherwise.
pub const fn is_lit(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_lit(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Lit
.
pub fn as_lit(&self) -> Option<&Lit>
Available on crate feature ecma_ast
only.
pub fn as_lit(&self) -> Option<&Lit>
ecma_ast
only.Returns Some
if self
is a reference of variant Lit
, and None
otherwise.
pub fn as_mut_lit(&mut self) -> Option<&mut Lit>
Available on crate feature ecma_ast
only.
pub fn as_mut_lit(&mut self) -> Option<&mut Lit>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Lit
, and None
otherwise.
pub fn expect_lit(self) -> Lit
Available on crate feature ecma_ast
only.
pub fn expect_lit(self) -> Lit
ecma_ast
only.pub fn lit(self) -> Option<Lit>
Available on crate feature ecma_ast
only.
pub fn lit(self) -> Option<Lit>
ecma_ast
only.Returns Some
if self
is of variant Lit
, and None
otherwise.
pub const fn is_tpl(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_tpl(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Tpl
.
pub fn as_tpl(&self) -> Option<&Tpl>
Available on crate feature ecma_ast
only.
pub fn as_tpl(&self) -> Option<&Tpl>
ecma_ast
only.Returns Some
if self
is a reference of variant Tpl
, and None
otherwise.
pub fn as_mut_tpl(&mut self) -> Option<&mut Tpl>
Available on crate feature ecma_ast
only.
pub fn as_mut_tpl(&mut self) -> Option<&mut Tpl>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Tpl
, and None
otherwise.
pub fn expect_tpl(self) -> Tpl
Available on crate feature ecma_ast
only.
pub fn expect_tpl(self) -> Tpl
ecma_ast
only.pub fn tpl(self) -> Option<Tpl>
Available on crate feature ecma_ast
only.
pub fn tpl(self) -> Option<Tpl>
ecma_ast
only.Returns Some
if self
is of variant Tpl
, and None
otherwise.
pub const fn is_tagged_tpl(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_tagged_tpl(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant TaggedTpl
.
pub fn as_tagged_tpl(&self) -> Option<&TaggedTpl>
Available on crate feature ecma_ast
only.
pub fn as_tagged_tpl(&self) -> Option<&TaggedTpl>
ecma_ast
only.Returns Some
if self
is a reference of variant TaggedTpl
, and None
otherwise.
pub fn as_mut_tagged_tpl(&mut self) -> Option<&mut TaggedTpl>
Available on crate feature ecma_ast
only.
pub fn as_mut_tagged_tpl(&mut self) -> Option<&mut TaggedTpl>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant TaggedTpl
, and None
otherwise.
pub fn expect_tagged_tpl(self) -> TaggedTpl
Available on crate feature ecma_ast
only.
pub fn expect_tagged_tpl(self) -> TaggedTpl
ecma_ast
only.pub fn tagged_tpl(self) -> Option<TaggedTpl>
Available on crate feature ecma_ast
only.
pub fn tagged_tpl(self) -> Option<TaggedTpl>
ecma_ast
only.Returns Some
if self
is of variant TaggedTpl
, and None
otherwise.
pub const fn is_arrow(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_arrow(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Arrow
.
pub fn as_arrow(&self) -> Option<&ArrowExpr>
Available on crate feature ecma_ast
only.
pub fn as_arrow(&self) -> Option<&ArrowExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Arrow
, and None
otherwise.
pub fn as_mut_arrow(&mut self) -> Option<&mut ArrowExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_arrow(&mut self) -> Option<&mut ArrowExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Arrow
, and None
otherwise.
pub fn expect_arrow(self) -> ArrowExpr
Available on crate feature ecma_ast
only.
pub fn expect_arrow(self) -> ArrowExpr
ecma_ast
only.pub fn arrow(self) -> Option<ArrowExpr>
Available on crate feature ecma_ast
only.
pub fn arrow(self) -> Option<ArrowExpr>
ecma_ast
only.Returns Some
if self
is of variant Arrow
, and None
otherwise.
pub const fn is_class(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_class(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Class
.
pub fn as_class(&self) -> Option<&ClassExpr>
Available on crate feature ecma_ast
only.
pub fn as_class(&self) -> Option<&ClassExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Class
, and None
otherwise.
pub fn as_mut_class(&mut self) -> Option<&mut ClassExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_class(&mut self) -> Option<&mut ClassExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Class
, and None
otherwise.
pub fn expect_class(self) -> ClassExpr
Available on crate feature ecma_ast
only.
pub fn expect_class(self) -> ClassExpr
ecma_ast
only.pub fn class(self) -> Option<ClassExpr>
Available on crate feature ecma_ast
only.
pub fn class(self) -> Option<ClassExpr>
ecma_ast
only.Returns Some
if self
is of variant Class
, and None
otherwise.
pub const fn is_yield_expr(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_yield_expr(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Yield
.
pub fn as_yield_expr(&self) -> Option<&YieldExpr>
Available on crate feature ecma_ast
only.
pub fn as_yield_expr(&self) -> Option<&YieldExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Yield
, and None
otherwise.
pub fn as_mut_yield_expr(&mut self) -> Option<&mut YieldExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_yield_expr(&mut self) -> Option<&mut YieldExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Yield
, and None
otherwise.
pub fn expect_yield_expr(self) -> YieldExpr
Available on crate feature ecma_ast
only.
pub fn expect_yield_expr(self) -> YieldExpr
ecma_ast
only.pub fn yield_expr(self) -> Option<YieldExpr>
Available on crate feature ecma_ast
only.
pub fn yield_expr(self) -> Option<YieldExpr>
ecma_ast
only.Returns Some
if self
is of variant Yield
, and None
otherwise.
pub const fn is_meta_prop(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_meta_prop(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant MetaProp
.
pub fn as_meta_prop(&self) -> Option<&MetaPropExpr>
Available on crate feature ecma_ast
only.
pub fn as_meta_prop(&self) -> Option<&MetaPropExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant MetaProp
, and None
otherwise.
pub fn as_mut_meta_prop(&mut self) -> Option<&mut MetaPropExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_meta_prop(&mut self) -> Option<&mut MetaPropExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant MetaProp
, and None
otherwise.
pub fn expect_meta_prop(self) -> MetaPropExpr
Available on crate feature ecma_ast
only.
pub fn expect_meta_prop(self) -> MetaPropExpr
ecma_ast
only.pub fn meta_prop(self) -> Option<MetaPropExpr>
Available on crate feature ecma_ast
only.
pub fn meta_prop(self) -> Option<MetaPropExpr>
ecma_ast
only.Returns Some
if self
is of variant MetaProp
, and None
otherwise.
pub const fn is_await_expr(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_await_expr(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Await
.
pub fn as_await_expr(&self) -> Option<&AwaitExpr>
Available on crate feature ecma_ast
only.
pub fn as_await_expr(&self) -> Option<&AwaitExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Await
, and None
otherwise.
pub fn as_mut_await_expr(&mut self) -> Option<&mut AwaitExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_await_expr(&mut self) -> Option<&mut AwaitExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Await
, and None
otherwise.
pub fn expect_await_expr(self) -> AwaitExpr
Available on crate feature ecma_ast
only.
pub fn expect_await_expr(self) -> AwaitExpr
ecma_ast
only.pub fn await_expr(self) -> Option<AwaitExpr>
Available on crate feature ecma_ast
only.
pub fn await_expr(self) -> Option<AwaitExpr>
ecma_ast
only.Returns Some
if self
is of variant Await
, and None
otherwise.
pub const fn is_paren(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_paren(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Paren
.
pub fn as_paren(&self) -> Option<&ParenExpr>
Available on crate feature ecma_ast
only.
pub fn as_paren(&self) -> Option<&ParenExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant Paren
, and None
otherwise.
pub fn as_mut_paren(&mut self) -> Option<&mut ParenExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_paren(&mut self) -> Option<&mut ParenExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Paren
, and None
otherwise.
pub fn expect_paren(self) -> ParenExpr
Available on crate feature ecma_ast
only.
pub fn expect_paren(self) -> ParenExpr
ecma_ast
only.pub fn paren(self) -> Option<ParenExpr>
Available on crate feature ecma_ast
only.
pub fn paren(self) -> Option<ParenExpr>
ecma_ast
only.Returns Some
if self
is of variant Paren
, and None
otherwise.
pub const fn is_jsx_member(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_jsx_member(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant JSXMember
.
pub fn as_jsx_member(&self) -> Option<&JSXMemberExpr>
Available on crate feature ecma_ast
only.
pub fn as_jsx_member(&self) -> Option<&JSXMemberExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant JSXMember
, and None
otherwise.
pub fn as_mut_jsx_member(&mut self) -> Option<&mut JSXMemberExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_jsx_member(&mut self) -> Option<&mut JSXMemberExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant JSXMember
, and None
otherwise.
pub fn expect_jsx_member(self) -> JSXMemberExpr
Available on crate feature ecma_ast
only.
pub fn expect_jsx_member(self) -> JSXMemberExpr
ecma_ast
only.pub fn jsx_member(self) -> Option<JSXMemberExpr>
Available on crate feature ecma_ast
only.
pub fn jsx_member(self) -> Option<JSXMemberExpr>
ecma_ast
only.Returns Some
if self
is of variant JSXMember
, and None
otherwise.
pub const fn is_jsx_namespaced_name(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_jsx_namespaced_name(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant JSXNamespacedName
.
pub fn as_jsx_namespaced_name(&self) -> Option<&JSXNamespacedName>
Available on crate feature ecma_ast
only.
pub fn as_jsx_namespaced_name(&self) -> Option<&JSXNamespacedName>
ecma_ast
only.Returns Some
if self
is a reference of variant JSXNamespacedName
, and None
otherwise.
pub fn as_mut_jsx_namespaced_name(&mut self) -> Option<&mut JSXNamespacedName>
Available on crate feature ecma_ast
only.
pub fn as_mut_jsx_namespaced_name(&mut self) -> Option<&mut JSXNamespacedName>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant JSXNamespacedName
, and None
otherwise.
pub fn expect_jsx_namespaced_name(self) -> JSXNamespacedName
Available on crate feature ecma_ast
only.
pub fn expect_jsx_namespaced_name(self) -> JSXNamespacedName
ecma_ast
only.Unwraps the value, yielding the content of JSXNamespacedName
.
§Panics
Panics if the value is not JSXNamespacedName
, with a panic message including the content of self
.
pub fn jsx_namespaced_name(self) -> Option<JSXNamespacedName>
Available on crate feature ecma_ast
only.
pub fn jsx_namespaced_name(self) -> Option<JSXNamespacedName>
ecma_ast
only.Returns Some
if self
is of variant JSXNamespacedName
, and None
otherwise.
pub const fn is_jsx_empty(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_jsx_empty(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant JSXEmpty
.
pub fn as_jsx_empty(&self) -> Option<&JSXEmptyExpr>
Available on crate feature ecma_ast
only.
pub fn as_jsx_empty(&self) -> Option<&JSXEmptyExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant JSXEmpty
, and None
otherwise.
pub fn as_mut_jsx_empty(&mut self) -> Option<&mut JSXEmptyExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_jsx_empty(&mut self) -> Option<&mut JSXEmptyExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant JSXEmpty
, and None
otherwise.
pub fn expect_jsx_empty(self) -> JSXEmptyExpr
Available on crate feature ecma_ast
only.
pub fn expect_jsx_empty(self) -> JSXEmptyExpr
ecma_ast
only.pub fn jsx_empty(self) -> Option<JSXEmptyExpr>
Available on crate feature ecma_ast
only.
pub fn jsx_empty(self) -> Option<JSXEmptyExpr>
ecma_ast
only.Returns Some
if self
is of variant JSXEmpty
, and None
otherwise.
pub const fn is_jsx_element(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_jsx_element(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant JSXElement
.
pub fn as_jsx_element(&self) -> Option<&Box<JSXElement>>
Available on crate feature ecma_ast
only.
pub fn as_jsx_element(&self) -> Option<&Box<JSXElement>>
ecma_ast
only.Returns Some
if self
is a reference of variant JSXElement
, and None
otherwise.
pub fn as_mut_jsx_element(&mut self) -> Option<&mut Box<JSXElement>>
Available on crate feature ecma_ast
only.
pub fn as_mut_jsx_element(&mut self) -> Option<&mut Box<JSXElement>>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant JSXElement
, and None
otherwise.
pub fn expect_jsx_element(self) -> Box<JSXElement>
Available on crate feature ecma_ast
only.
pub fn expect_jsx_element(self) -> Box<JSXElement>
ecma_ast
only.Unwraps the value, yielding the content of JSXElement
.
§Panics
Panics if the value is not JSXElement
, with a panic message including the content of self
.
pub fn jsx_element(self) -> Option<Box<JSXElement>>
Available on crate feature ecma_ast
only.
pub fn jsx_element(self) -> Option<Box<JSXElement>>
ecma_ast
only.Returns Some
if self
is of variant JSXElement
, and None
otherwise.
pub const fn is_jsx_fragment(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_jsx_fragment(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant JSXFragment
.
pub fn as_jsx_fragment(&self) -> Option<&JSXFragment>
Available on crate feature ecma_ast
only.
pub fn as_jsx_fragment(&self) -> Option<&JSXFragment>
ecma_ast
only.Returns Some
if self
is a reference of variant JSXFragment
, and None
otherwise.
pub fn as_mut_jsx_fragment(&mut self) -> Option<&mut JSXFragment>
Available on crate feature ecma_ast
only.
pub fn as_mut_jsx_fragment(&mut self) -> Option<&mut JSXFragment>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant JSXFragment
, and None
otherwise.
pub fn expect_jsx_fragment(self) -> JSXFragment
Available on crate feature ecma_ast
only.
pub fn expect_jsx_fragment(self) -> JSXFragment
ecma_ast
only.Unwraps the value, yielding the content of JSXFragment
.
§Panics
Panics if the value is not JSXFragment
, with a panic message including the content of self
.
pub fn jsx_fragment(self) -> Option<JSXFragment>
Available on crate feature ecma_ast
only.
pub fn jsx_fragment(self) -> Option<JSXFragment>
ecma_ast
only.Returns Some
if self
is of variant JSXFragment
, and None
otherwise.
pub const fn is_ts_type_assertion(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_ts_type_assertion(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant TsTypeAssertion
.
pub fn as_ts_type_assertion(&self) -> Option<&TsTypeAssertion>
Available on crate feature ecma_ast
only.
pub fn as_ts_type_assertion(&self) -> Option<&TsTypeAssertion>
ecma_ast
only.Returns Some
if self
is a reference of variant TsTypeAssertion
, and None
otherwise.
pub fn as_mut_ts_type_assertion(&mut self) -> Option<&mut TsTypeAssertion>
Available on crate feature ecma_ast
only.
pub fn as_mut_ts_type_assertion(&mut self) -> Option<&mut TsTypeAssertion>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant TsTypeAssertion
, and None
otherwise.
pub fn expect_ts_type_assertion(self) -> TsTypeAssertion
Available on crate feature ecma_ast
only.
pub fn expect_ts_type_assertion(self) -> TsTypeAssertion
ecma_ast
only.Unwraps the value, yielding the content of TsTypeAssertion
.
§Panics
Panics if the value is not TsTypeAssertion
, with a panic message including the content of self
.
pub fn ts_type_assertion(self) -> Option<TsTypeAssertion>
Available on crate feature ecma_ast
only.
pub fn ts_type_assertion(self) -> Option<TsTypeAssertion>
ecma_ast
only.Returns Some
if self
is of variant TsTypeAssertion
, and None
otherwise.
pub const fn is_ts_const_assertion(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_ts_const_assertion(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant TsConstAssertion
.
pub fn as_ts_const_assertion(&self) -> Option<&TsConstAssertion>
Available on crate feature ecma_ast
only.
pub fn as_ts_const_assertion(&self) -> Option<&TsConstAssertion>
ecma_ast
only.Returns Some
if self
is a reference of variant TsConstAssertion
, and None
otherwise.
pub fn as_mut_ts_const_assertion(&mut self) -> Option<&mut TsConstAssertion>
Available on crate feature ecma_ast
only.
pub fn as_mut_ts_const_assertion(&mut self) -> Option<&mut TsConstAssertion>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant TsConstAssertion
, and None
otherwise.
pub fn expect_ts_const_assertion(self) -> TsConstAssertion
Available on crate feature ecma_ast
only.
pub fn expect_ts_const_assertion(self) -> TsConstAssertion
ecma_ast
only.Unwraps the value, yielding the content of TsConstAssertion
.
§Panics
Panics if the value is not TsConstAssertion
, with a panic message including the content of self
.
pub fn ts_const_assertion(self) -> Option<TsConstAssertion>
Available on crate feature ecma_ast
only.
pub fn ts_const_assertion(self) -> Option<TsConstAssertion>
ecma_ast
only.Returns Some
if self
is of variant TsConstAssertion
, and None
otherwise.
pub const fn is_ts_non_null(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_ts_non_null(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant TsNonNull
.
pub fn as_ts_non_null(&self) -> Option<&TsNonNullExpr>
Available on crate feature ecma_ast
only.
pub fn as_ts_non_null(&self) -> Option<&TsNonNullExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant TsNonNull
, and None
otherwise.
pub fn as_mut_ts_non_null(&mut self) -> Option<&mut TsNonNullExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_ts_non_null(&mut self) -> Option<&mut TsNonNullExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant TsNonNull
, and None
otherwise.
pub fn expect_ts_non_null(self) -> TsNonNullExpr
Available on crate feature ecma_ast
only.
pub fn expect_ts_non_null(self) -> TsNonNullExpr
ecma_ast
only.pub fn ts_non_null(self) -> Option<TsNonNullExpr>
Available on crate feature ecma_ast
only.
pub fn ts_non_null(self) -> Option<TsNonNullExpr>
ecma_ast
only.Returns Some
if self
is of variant TsNonNull
, and None
otherwise.
pub const fn is_ts_as(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_ts_as(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant TsAs
.
pub fn as_ts_as(&self) -> Option<&TsAsExpr>
Available on crate feature ecma_ast
only.
pub fn as_ts_as(&self) -> Option<&TsAsExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant TsAs
, and None
otherwise.
pub fn as_mut_ts_as(&mut self) -> Option<&mut TsAsExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_ts_as(&mut self) -> Option<&mut TsAsExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant TsAs
, and None
otherwise.
pub fn expect_ts_as(self) -> TsAsExpr
Available on crate feature ecma_ast
only.
pub fn expect_ts_as(self) -> TsAsExpr
ecma_ast
only.pub fn ts_as(self) -> Option<TsAsExpr>
Available on crate feature ecma_ast
only.
pub fn ts_as(self) -> Option<TsAsExpr>
ecma_ast
only.Returns Some
if self
is of variant TsAs
, and None
otherwise.
pub const fn is_ts_instantiation(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_ts_instantiation(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant TsInstantiation
.
pub fn as_ts_instantiation(&self) -> Option<&TsInstantiation>
Available on crate feature ecma_ast
only.
pub fn as_ts_instantiation(&self) -> Option<&TsInstantiation>
ecma_ast
only.Returns Some
if self
is a reference of variant TsInstantiation
, and None
otherwise.
pub fn as_mut_ts_instantiation(&mut self) -> Option<&mut TsInstantiation>
Available on crate feature ecma_ast
only.
pub fn as_mut_ts_instantiation(&mut self) -> Option<&mut TsInstantiation>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant TsInstantiation
, and None
otherwise.
pub fn expect_ts_instantiation(self) -> TsInstantiation
Available on crate feature ecma_ast
only.
pub fn expect_ts_instantiation(self) -> TsInstantiation
ecma_ast
only.Unwraps the value, yielding the content of TsInstantiation
.
§Panics
Panics if the value is not TsInstantiation
, with a panic message including the content of self
.
pub fn ts_instantiation(self) -> Option<TsInstantiation>
Available on crate feature ecma_ast
only.
pub fn ts_instantiation(self) -> Option<TsInstantiation>
ecma_ast
only.Returns Some
if self
is of variant TsInstantiation
, and None
otherwise.
pub const fn is_ts_satisfies(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_ts_satisfies(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant TsSatisfies
.
pub fn as_ts_satisfies(&self) -> Option<&TsSatisfiesExpr>
Available on crate feature ecma_ast
only.
pub fn as_ts_satisfies(&self) -> Option<&TsSatisfiesExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant TsSatisfies
, and None
otherwise.
pub fn as_mut_ts_satisfies(&mut self) -> Option<&mut TsSatisfiesExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_ts_satisfies(&mut self) -> Option<&mut TsSatisfiesExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant TsSatisfies
, and None
otherwise.
pub fn expect_ts_satisfies(self) -> TsSatisfiesExpr
Available on crate feature ecma_ast
only.
pub fn expect_ts_satisfies(self) -> TsSatisfiesExpr
ecma_ast
only.Unwraps the value, yielding the content of TsSatisfies
.
§Panics
Panics if the value is not TsSatisfies
, with a panic message including the content of self
.
pub fn ts_satisfies(self) -> Option<TsSatisfiesExpr>
Available on crate feature ecma_ast
only.
pub fn ts_satisfies(self) -> Option<TsSatisfiesExpr>
ecma_ast
only.Returns Some
if self
is of variant TsSatisfies
, and None
otherwise.
pub const fn is_private_name(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_private_name(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant PrivateName
.
pub fn as_private_name(&self) -> Option<&PrivateName>
Available on crate feature ecma_ast
only.
pub fn as_private_name(&self) -> Option<&PrivateName>
ecma_ast
only.Returns Some
if self
is a reference of variant PrivateName
, and None
otherwise.
pub fn as_mut_private_name(&mut self) -> Option<&mut PrivateName>
Available on crate feature ecma_ast
only.
pub fn as_mut_private_name(&mut self) -> Option<&mut PrivateName>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant PrivateName
, and None
otherwise.
pub fn expect_private_name(self) -> PrivateName
Available on crate feature ecma_ast
only.
pub fn expect_private_name(self) -> PrivateName
ecma_ast
only.Unwraps the value, yielding the content of PrivateName
.
§Panics
Panics if the value is not PrivateName
, with a panic message including the content of self
.
pub fn private_name(self) -> Option<PrivateName>
Available on crate feature ecma_ast
only.
pub fn private_name(self) -> Option<PrivateName>
ecma_ast
only.Returns Some
if self
is of variant PrivateName
, and None
otherwise.
pub const fn is_opt_chain(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_opt_chain(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant OptChain
.
pub fn as_opt_chain(&self) -> Option<&OptChainExpr>
Available on crate feature ecma_ast
only.
pub fn as_opt_chain(&self) -> Option<&OptChainExpr>
ecma_ast
only.Returns Some
if self
is a reference of variant OptChain
, and None
otherwise.
pub fn as_mut_opt_chain(&mut self) -> Option<&mut OptChainExpr>
Available on crate feature ecma_ast
only.
pub fn as_mut_opt_chain(&mut self) -> Option<&mut OptChainExpr>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant OptChain
, and None
otherwise.
pub fn expect_opt_chain(self) -> OptChainExpr
Available on crate feature ecma_ast
only.
pub fn expect_opt_chain(self) -> OptChainExpr
ecma_ast
only.pub fn opt_chain(self) -> Option<OptChainExpr>
Available on crate feature ecma_ast
only.
pub fn opt_chain(self) -> Option<OptChainExpr>
ecma_ast
only.Returns Some
if self
is of variant OptChain
, and None
otherwise.
pub const fn is_invalid(&self) -> bool
Available on crate feature ecma_ast
only.
pub const fn is_invalid(&self) -> bool
ecma_ast
only.Returns true
if self
is of variant Invalid
.
pub fn as_invalid(&self) -> Option<&Invalid>
Available on crate feature ecma_ast
only.
pub fn as_invalid(&self) -> Option<&Invalid>
ecma_ast
only.Returns Some
if self
is a reference of variant Invalid
, and None
otherwise.
pub fn as_mut_invalid(&mut self) -> Option<&mut Invalid>
Available on crate feature ecma_ast
only.
pub fn as_mut_invalid(&mut self) -> Option<&mut Invalid>
ecma_ast
only.Returns Some
if self
is a mutable reference of variant Invalid
, and None
otherwise.
pub fn expect_invalid(self) -> Invalid
Available on crate feature ecma_ast
only.
pub fn expect_invalid(self) -> Invalid
ecma_ast
only.§impl Expr
impl Expr
pub fn leftmost(&self) -> Option<&Ident>
ecma_ast
only.pub fn is_ident_ref_to(&self, ident: &str) -> bool
ecma_ast
only.pub fn unwrap_with<'a, F>(&'a self, op: F) -> &'a Expr
Available on crate feature ecma_ast
only.
pub fn unwrap_with<'a, F>(&'a self, op: F) -> &'a Expr
ecma_ast
only.pub fn unwrap_mut_with<'a, F>(&'a mut self, op: F) -> &'a mut Expr
Available on crate feature ecma_ast
only.
pub fn unwrap_mut_with<'a, F>(&'a mut self, op: F) -> &'a mut Expr
ecma_ast
only.pub fn unwrap_parens(&self) -> &Expr
Available on crate feature ecma_ast
only.
pub fn unwrap_parens(&self) -> &Expr
ecma_ast
only.Normalize parenthesized expressions.
This will normalize (foo)
, ((foo))
, … to foo
.
If self
is not a parenthesized expression, it will be returned as is.
pub fn unwrap_parens_mut(&mut self) -> &mut Expr
Available on crate feature ecma_ast
only.
pub fn unwrap_parens_mut(&mut self) -> &mut Expr
ecma_ast
only.Normalize parenthesized expressions.
This will normalize (foo)
, ((foo))
, … to foo
.
If self
is not a parenthesized expression, it will be returned as is.
pub fn unwrap_seqs_and_parens(&self) -> &Expr
Available on crate feature ecma_ast
only.
pub fn unwrap_seqs_and_parens(&self) -> &Expr
ecma_ast
only.Normalize sequences and parenthesized expressions.
This returns the last expression of a sequence expression or the expression of a parenthesized expression.
pub fn from_exprs(exprs: Vec<Box<Expr>>) -> Box<Expr>
Available on crate feature ecma_ast
only.
pub fn from_exprs(exprs: Vec<Box<Expr>>) -> Box<Expr>
ecma_ast
only.Creates an expression from exprs
. This will return first element if
the length is 1 and a sequential expression otherwise.
§Panics
Panics if exprs
is empty.
pub fn directness_maters(&self) -> bool
Available on crate feature ecma_ast
only.
pub fn directness_maters(&self) -> bool
ecma_ast
only.Returns true for eval
and member expressions.
pub fn with_span(self, span: Span) -> Expr
ecma_ast
only.pub fn set_span(&mut self, span: Span)
ecma_ast
only.Trait Implementations§
§impl Archive for Expr
impl Archive for Expr
§type Archived = ArchivedExpr
type Archived = ArchivedExpr
§type Resolver = ExprResolver
type Resolver = ExprResolver
§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Expr, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Expr, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl<__D> Deserialize<Expr, __D> for <Expr as Archive>::Archivedwhere
__D: Fallible + ?Sized,
impl<__D> Deserialize<Expr, __D> for <Expr as Archive>::Archivedwhere
__D: Fallible + ?Sized,
§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<Expr, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<Expr, <__D as Fallible>::Error>
§impl EndsWithAlphaNum for Expr
impl EndsWithAlphaNum for Expr
fn ends_with_alpha_num(&self) -> bool
§impl EqIgnoreSpan for Expr
impl EqIgnoreSpan for Expr
fn eq_ignore_span(&self, other: &Expr) -> bool
§impl ExprExt for Box<Expr>
impl ExprExt for Box<Expr>
fn as_expr(&self) -> &Expr
§fn is_immutable_value(&self) -> bool
fn is_immutable_value(&self) -> bool
fn is_number(&self) -> bool
fn is_str(&self) -> bool
fn is_array_lit(&self) -> bool
fn is_undefined(&self, ctx: &ExprCtx) -> bool
fn is_void(&self) -> bool
§fn is_global_ref_to(&self, ctx: &ExprCtx, id: &str) -> bool
fn is_global_ref_to(&self, ctx: &ExprCtx, id: &str) -> bool
true
if id
references a global object.§fn is_one_of_global_ref_to(&self, ctx: &ExprCtx, ids: &[&str]) -> bool
fn is_one_of_global_ref_to(&self, ctx: &ExprCtx, ids: &[&str]) -> bool
true
if id
references a global object.§fn as_pure_bool(&self, ctx: &ExprCtx) -> Value<bool>
fn as_pure_bool(&self, ctx: &ExprCtx) -> Value<bool>
self
if it does not have any side effects.§fn cast_to_bool(&self, ctx: &ExprCtx) -> (Purity, Value<bool>)
fn cast_to_bool(&self, ctx: &ExprCtx) -> (Purity, Value<bool>)
Boolean()
JavaScript cast function.
Note: unlike getPureBooleanValue this function does not return None
for expressions with side-effects.fn cast_to_number(&self, ctx: &ExprCtx) -> (Purity, Value<f64>)
§fn as_pure_number(&self, ctx: &ExprCtx) -> Value<f64>
fn as_pure_number(&self, ctx: &ExprCtx) -> Value<f64>
§fn get_type(&self) -> Value<Type>
fn get_type(&self) -> Value<Type>
fn is_pure_callee(&self, ctx: &ExprCtx) -> bool
fn may_have_side_effects(&self, ctx: &ExprCtx) -> bool
§impl ExprExt for Expr
impl ExprExt for Expr
fn as_expr(&self) -> &Expr
§fn is_immutable_value(&self) -> bool
fn is_immutable_value(&self) -> bool
fn is_number(&self) -> bool
fn is_str(&self) -> bool
fn is_array_lit(&self) -> bool
fn is_undefined(&self, ctx: &ExprCtx) -> bool
fn is_void(&self) -> bool
§fn is_global_ref_to(&self, ctx: &ExprCtx, id: &str) -> bool
fn is_global_ref_to(&self, ctx: &ExprCtx, id: &str) -> bool
true
if id
references a global object.§fn is_one_of_global_ref_to(&self, ctx: &ExprCtx, ids: &[&str]) -> bool
fn is_one_of_global_ref_to(&self, ctx: &ExprCtx, ids: &[&str]) -> bool
true
if id
references a global object.§fn as_pure_bool(&self, ctx: &ExprCtx) -> Value<bool>
fn as_pure_bool(&self, ctx: &ExprCtx) -> Value<bool>
self
if it does not have any side effects.§fn cast_to_bool(&self, ctx: &ExprCtx) -> (Purity, Value<bool>)
fn cast_to_bool(&self, ctx: &ExprCtx) -> (Purity, Value<bool>)
Boolean()
JavaScript cast function.
Note: unlike getPureBooleanValue this function does not return None
for expressions with side-effects.fn cast_to_number(&self, ctx: &ExprCtx) -> (Purity, Value<f64>)
§fn as_pure_number(&self, ctx: &ExprCtx) -> Value<f64>
fn as_pure_number(&self, ctx: &ExprCtx) -> Value<f64>
§fn get_type(&self) -> Value<Type>
fn get_type(&self) -> Value<Type>
fn is_pure_callee(&self, ctx: &ExprCtx) -> bool
fn may_have_side_effects(&self, ctx: &ExprCtx) -> bool
§impl<V> FoldWith<V> for Expr
impl<V> FoldWith<V> for Expr
§fn fold_with(self, visitor: &mut V) -> Expr
fn fold_with(self, visitor: &mut V) -> Expr
Calls Fold::fold_expr
with self
.
§fn fold_children_with(self, visitor: &mut V) -> Expr
fn fold_children_with(self, visitor: &mut V) -> Expr
self`` with
visitor`.§impl From<(Atom, SyntaxContext)> for Expr
impl From<(Atom, SyntaxContext)> for Expr
§fn from(src: (Atom, SyntaxContext)) -> Expr
fn from(src: (Atom, SyntaxContext)) -> Expr
§impl From<AssignExpr> for Box<Expr>
impl From<AssignExpr> for Box<Expr>
§fn from(src: AssignExpr) -> Box<Expr>
fn from(src: AssignExpr) -> Box<Expr>
§impl From<AssignExpr> for Expr
impl From<AssignExpr> for Expr
§fn from(v: AssignExpr) -> Expr
fn from(v: AssignExpr) -> Expr
§impl From<BindingIdent> for Box<Expr>
impl From<BindingIdent> for Box<Expr>
§fn from(bi: BindingIdent) -> Box<Expr>
fn from(bi: BindingIdent) -> Box<Expr>
§impl From<Box<JSXElement>> for Expr
impl From<Box<JSXElement>> for Expr
§fn from(v: Box<JSXElement>) -> Expr
fn from(v: Box<JSXElement>) -> Expr
§impl From<Expr> for ExprOrSpread
impl From<Expr> for ExprOrSpread
§fn from(src: Expr) -> ExprOrSpread
fn from(src: Expr) -> ExprOrSpread
§impl From<Expr> for VarDeclOrExpr
impl From<Expr> for VarDeclOrExpr
§fn from(src: Expr) -> VarDeclOrExpr
fn from(src: Expr) -> VarDeclOrExpr
§impl From<JSXElement> for Box<Expr>
impl From<JSXElement> for Box<Expr>
§fn from(src: JSXElement) -> Box<Expr>
fn from(src: JSXElement) -> Box<Expr>
§impl From<JSXEmptyExpr> for Box<Expr>
impl From<JSXEmptyExpr> for Box<Expr>
§fn from(src: JSXEmptyExpr) -> Box<Expr>
fn from(src: JSXEmptyExpr) -> Box<Expr>
§impl From<JSXEmptyExpr> for Expr
impl From<JSXEmptyExpr> for Expr
§fn from(v: JSXEmptyExpr) -> Expr
fn from(v: JSXEmptyExpr) -> Expr
§impl From<JSXFragment> for Box<Expr>
impl From<JSXFragment> for Box<Expr>
§fn from(src: JSXFragment) -> Box<Expr>
fn from(src: JSXFragment) -> Box<Expr>
§impl From<JSXFragment> for Expr
impl From<JSXFragment> for Expr
§fn from(v: JSXFragment) -> Expr
fn from(v: JSXFragment) -> Expr
§impl From<JSXMemberExpr> for Box<Expr>
impl From<JSXMemberExpr> for Box<Expr>
§fn from(src: JSXMemberExpr) -> Box<Expr>
fn from(src: JSXMemberExpr) -> Box<Expr>
§impl From<JSXMemberExpr> for Expr
impl From<JSXMemberExpr> for Expr
§fn from(v: JSXMemberExpr) -> Expr
fn from(v: JSXMemberExpr) -> Expr
§impl From<JSXNamespacedName> for Box<Expr>
impl From<JSXNamespacedName> for Box<Expr>
§fn from(src: JSXNamespacedName) -> Box<Expr>
fn from(src: JSXNamespacedName) -> Box<Expr>
§impl From<JSXNamespacedName> for Expr
impl From<JSXNamespacedName> for Expr
§fn from(v: JSXNamespacedName) -> Expr
fn from(v: JSXNamespacedName) -> Expr
§impl From<MemberExpr> for Box<Expr>
impl From<MemberExpr> for Box<Expr>
§fn from(src: MemberExpr) -> Box<Expr>
fn from(src: MemberExpr) -> Box<Expr>
§impl From<MemberExpr> for Expr
impl From<MemberExpr> for Expr
§fn from(v: MemberExpr) -> Expr
fn from(v: MemberExpr) -> Expr
§impl From<MetaPropExpr> for Box<Expr>
impl From<MetaPropExpr> for Box<Expr>
§fn from(src: MetaPropExpr) -> Box<Expr>
fn from(src: MetaPropExpr) -> Box<Expr>
§impl From<MetaPropExpr> for Expr
impl From<MetaPropExpr> for Expr
§fn from(v: MetaPropExpr) -> Expr
fn from(v: MetaPropExpr) -> Expr
§impl From<OptChainBase> for Expr
impl From<OptChainBase> for Expr
§fn from(opt: OptChainBase) -> Expr
fn from(opt: OptChainBase) -> Expr
§impl From<OptChainExpr> for Box<Expr>
impl From<OptChainExpr> for Box<Expr>
§fn from(src: OptChainExpr) -> Box<Expr>
fn from(src: OptChainExpr) -> Box<Expr>
§impl From<OptChainExpr> for Expr
impl From<OptChainExpr> for Expr
§fn from(v: OptChainExpr) -> Expr
fn from(v: OptChainExpr) -> Expr
§impl From<PrivateName> for Box<Expr>
impl From<PrivateName> for Box<Expr>
§fn from(src: PrivateName) -> Box<Expr>
fn from(src: PrivateName) -> Box<Expr>
§impl From<PrivateName> for Expr
impl From<PrivateName> for Expr
§fn from(v: PrivateName) -> Expr
fn from(v: PrivateName) -> Expr
§impl From<SimpleAssignTarget> for Box<Expr>
impl From<SimpleAssignTarget> for Box<Expr>
§fn from(s: SimpleAssignTarget) -> Box<Expr>
fn from(s: SimpleAssignTarget) -> Box<Expr>
§impl From<SuperPropExpr> for Box<Expr>
impl From<SuperPropExpr> for Box<Expr>
§fn from(src: SuperPropExpr) -> Box<Expr>
fn from(src: SuperPropExpr) -> Box<Expr>
§impl From<SuperPropExpr> for Expr
impl From<SuperPropExpr> for Expr
§fn from(v: SuperPropExpr) -> Expr
fn from(v: SuperPropExpr) -> Expr
§impl From<TsConstAssertion> for Box<Expr>
impl From<TsConstAssertion> for Box<Expr>
§fn from(src: TsConstAssertion) -> Box<Expr>
fn from(src: TsConstAssertion) -> Box<Expr>
§impl From<TsConstAssertion> for Expr
impl From<TsConstAssertion> for Expr
§fn from(v: TsConstAssertion) -> Expr
fn from(v: TsConstAssertion) -> Expr
§impl From<TsInstantiation> for Box<Expr>
impl From<TsInstantiation> for Box<Expr>
§fn from(src: TsInstantiation) -> Box<Expr>
fn from(src: TsInstantiation) -> Box<Expr>
§impl From<TsInstantiation> for Expr
impl From<TsInstantiation> for Expr
§fn from(v: TsInstantiation) -> Expr
fn from(v: TsInstantiation) -> Expr
§impl From<TsNonNullExpr> for Box<Expr>
impl From<TsNonNullExpr> for Box<Expr>
§fn from(src: TsNonNullExpr) -> Box<Expr>
fn from(src: TsNonNullExpr) -> Box<Expr>
§impl From<TsNonNullExpr> for Expr
impl From<TsNonNullExpr> for Expr
§fn from(v: TsNonNullExpr) -> Expr
fn from(v: TsNonNullExpr) -> Expr
§impl From<TsSatisfiesExpr> for Box<Expr>
impl From<TsSatisfiesExpr> for Box<Expr>
§fn from(src: TsSatisfiesExpr) -> Box<Expr>
fn from(src: TsSatisfiesExpr) -> Box<Expr>
§impl From<TsSatisfiesExpr> for Expr
impl From<TsSatisfiesExpr> for Expr
§fn from(v: TsSatisfiesExpr) -> Expr
fn from(v: TsSatisfiesExpr) -> Expr
§impl From<TsTypeAssertion> for Box<Expr>
impl From<TsTypeAssertion> for Box<Expr>
§fn from(src: TsTypeAssertion) -> Box<Expr>
fn from(src: TsTypeAssertion) -> Box<Expr>
§impl From<TsTypeAssertion> for Expr
impl From<TsTypeAssertion> for Expr
§fn from(v: TsTypeAssertion) -> Expr
fn from(v: TsTypeAssertion) -> Expr
§impl From<UpdateExpr> for Box<Expr>
impl From<UpdateExpr> for Box<Expr>
§fn from(src: UpdateExpr) -> Box<Expr>
fn from(src: UpdateExpr) -> Box<Expr>
§impl From<UpdateExpr> for Expr
impl From<UpdateExpr> for Expr
§fn from(v: UpdateExpr) -> Expr
fn from(v: UpdateExpr) -> Expr
§impl InfectableNode for Expr
impl InfectableNode for Expr
fn is_fn_or_arrow_expr(&self) -> bool
§impl Into<Expr> for FunctionWrapper<Expr>
impl Into<Expr> for FunctionWrapper<Expr>
§fn into(self) -> Expr
fn into(self) -> Expr
If a function has a function name, it may be called recursively. We use the named expression to hoist the function name internally Therefore, its recursive calls refer to the correct identity.
Else if a function has a binding name, it may be called recursively as well. But it refer the binding name which exist the outer scope. It is safe to using anonymous expression wrapper.
Optimization: A function without a name cannot be recursively referenced by Ident. It’s safe to return the expr without wrapper if the params.len is 0.
§impl Node for Expr
impl Node for Expr
fn emit_with<W, S>(&self, e: &mut Emitter<'_, W, S>) -> Result<(), Error>where
S: SourceMapper + SourceMapperExt,
W: WriteJs,
§impl Serialize for Expr
impl Serialize for Expr
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
§impl StartsWithAlphaNum for Expr
impl StartsWithAlphaNum for Expr
fn starts_with_alpha_num(&self) -> bool
§impl<V> VisitMutWith<V> for Expr
impl<V> VisitMutWith<V> for Expr
§fn visit_mut_with(&mut self, visitor: &mut V)
fn visit_mut_with(&mut self, visitor: &mut V)
Calls VisitMut::visit_mut_expr
with self
.
§fn visit_mut_children_with(&mut self, visitor: &mut V)
fn visit_mut_children_with(&mut self, visitor: &mut V)
self`` with
visitor`.§impl<V> VisitWith<V> for Expr
impl<V> VisitWith<V> for Expr
§fn visit_with(&self, visitor: &mut V)
fn visit_with(&self, visitor: &mut V)
Calls Visit::visit_expr
with self
.
§fn visit_children_with(&self, visitor: &mut V)
fn visit_children_with(&self, visitor: &mut V)
self`` with
visitor`.impl Eq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive
, it may be unsized. Read more§type MetadataResolver = ()
type MetadataResolver = ()
§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata,
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> ExprFactory for T
impl<T> ExprFactory for T
§fn as_arg(self) -> ExprOrSpread
fn as_arg(self) -> ExprOrSpread
§fn into_return_stmt(self) -> ReturnStmt
fn into_return_stmt(self) -> ReturnStmt
self
.fn as_callee(self) -> Callee
fn as_iife(self) -> CallExpr
§fn into_lazy_arrow(self, params: Vec<Pat>) -> ArrowExpr
fn into_lazy_arrow(self, params: Vec<Pat>) -> ArrowExpr
fn into_lazy_auto(self, params: Vec<Pat>, support_arrow: bool) -> Expr
§fn into_var_decl(self, kind: VarDeclKind, name: Pat) -> VarDecl
fn into_var_decl(self, kind: VarDeclKind, name: Pat) -> VarDecl
fn into_new_expr(self, span: Span, args: Option<Vec<ExprOrSpread>>) -> NewExpr
fn apply(self, span: Span, this: Box<Expr>, args: Vec<ExprOrSpread>) -> Expr
fn call_fn(self, span: Span, args: Vec<ExprOrSpread>) -> Expr
fn as_call(self, span: Span, args: Vec<ExprOrSpread>) -> Expr
fn as_fn_decl(self) -> Option<FnDecl>
fn as_class_decl(self) -> Option<ClassDecl>
fn wrap_with_paren(self) -> Expr
§fn make_assign_to(self, op: AssignOp, left: AssignTarget) -> Expr
fn make_assign_to(self, op: AssignOp, left: AssignTarget) -> Expr
$lhs $op $self
fn make_member(self, prop: IdentName) -> MemberExpr
fn computed_member<T>(self, prop: T) -> MemberExpr
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
source§impl<T> ImplicitClone for Twhere
T: Clone,
impl<T> ImplicitClone for Twhere
T: Clone,
source§fn clone_quote_var(&self) -> Self
fn clone_quote_var(&self) -> Self
ecma_quote
only.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, S> SerializeUnsized<S> for Twhere
T: Serialize<S>,
S: Serializer + ?Sized,
impl<T, S> SerializeUnsized<S> for Twhere
T: Serialize<S>,
S: Serializer + ?Sized,
§fn serialize_unsized(
&self,
serializer: &mut S,
) -> Result<usize, <S as Fallible>::Error>
fn serialize_unsized( &self, serializer: &mut S, ) -> Result<usize, <S as Fallible>::Error>
§fn serialize_metadata(&self, _: &mut S) -> Result<(), <S as Fallible>::Error>
fn serialize_metadata(&self, _: &mut S) -> Result<(), <S as Fallible>::Error>
§impl<T> SpanExt for Twhere
T: Spanned,
impl<T> SpanExt for Twhere
T: Spanned,
fn is_synthesized(&self) -> bool
fn starts_on_new_line(&self, format: ListFormat) -> bool
§fn comment_range(&self) -> Span
fn comment_range(&self) -> Span
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.