Expr

Enum Expr 

Source
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),
}
Available on crate features __ecma and __visit 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§

Source§

impl Expr

Source

pub const fn is_this(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant This.

Source

pub fn as_this(&self) -> Option<&ThisExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant This, and None otherwise.

Source

pub fn as_mut_this(&mut self) -> Option<&mut ThisExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant This, and None otherwise.

Source

pub fn expect_this(self) -> ThisExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of This.

§Panics

Panics if the value is not This, with a panic message including the content of self.

Source

pub fn this(self) -> Option<ThisExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant This, and None otherwise.

Source

pub const fn is_array(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Array.

Source

pub fn as_array(&self) -> Option<&ArrayLit>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Array, and None otherwise.

Source

pub fn as_mut_array(&mut self) -> Option<&mut ArrayLit>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Array, and None otherwise.

Source

pub fn expect_array(self) -> ArrayLit
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Array.

§Panics

Panics if the value is not Array, with a panic message including the content of self.

Source

pub fn array(self) -> Option<ArrayLit>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Array, and None otherwise.

Source

pub const fn is_object(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Object.

Source

pub fn as_object(&self) -> Option<&ObjectLit>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Object, and None otherwise.

Source

pub fn as_mut_object(&mut self) -> Option<&mut ObjectLit>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Object, and None otherwise.

Source

pub fn expect_object(self) -> ObjectLit
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Object.

§Panics

Panics if the value is not Object, with a panic message including the content of self.

Source

pub fn object(self) -> Option<ObjectLit>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Object, and None otherwise.

Source

pub const fn is_fn_expr(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Fn.

Source

pub fn as_fn_expr(&self) -> Option<&FnExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Fn, and None otherwise.

Source

pub fn as_mut_fn_expr(&mut self) -> Option<&mut FnExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Fn, and None otherwise.

Source

pub fn expect_fn_expr(self) -> FnExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Fn.

§Panics

Panics if the value is not Fn, with a panic message including the content of self.

Source

pub fn fn_expr(self) -> Option<FnExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Fn, and None otherwise.

Source

pub const fn is_unary(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Unary.

Source

pub fn as_unary(&self) -> Option<&UnaryExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Unary, and None otherwise.

Source

pub fn as_mut_unary(&mut self) -> Option<&mut UnaryExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Unary, and None otherwise.

Source

pub fn expect_unary(self) -> UnaryExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Unary.

§Panics

Panics if the value is not Unary, with a panic message including the content of self.

Source

pub fn unary(self) -> Option<UnaryExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Unary, and None otherwise.

Source

pub const fn is_update(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Update.

Source

pub fn as_update(&self) -> Option<&UpdateExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Update, and None otherwise.

Source

pub fn as_mut_update(&mut self) -> Option<&mut UpdateExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Update, and None otherwise.

Source

pub fn expect_update(self) -> UpdateExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Update.

§Panics

Panics if the value is not Update, with a panic message including the content of self.

Source

pub fn update(self) -> Option<UpdateExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Update, and None otherwise.

Source

pub const fn is_bin(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Bin.

Source

pub fn as_bin(&self) -> Option<&BinExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Bin, and None otherwise.

Source

pub fn as_mut_bin(&mut self) -> Option<&mut BinExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Bin, and None otherwise.

Source

pub fn expect_bin(self) -> BinExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Bin.

§Panics

Panics if the value is not Bin, with a panic message including the content of self.

Source

pub fn bin(self) -> Option<BinExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Bin, and None otherwise.

Source

pub const fn is_assign(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Assign.

Source

pub fn as_assign(&self) -> Option<&AssignExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Assign, and None otherwise.

Source

pub fn as_mut_assign(&mut self) -> Option<&mut AssignExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Assign, and None otherwise.

Source

pub fn expect_assign(self) -> AssignExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Assign.

§Panics

Panics if the value is not Assign, with a panic message including the content of self.

Source

pub fn assign(self) -> Option<AssignExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Assign, and None otherwise.

Source

pub const fn is_member(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Member.

Source

pub fn as_member(&self) -> Option<&MemberExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Member, and None otherwise.

Source

pub fn as_mut_member(&mut self) -> Option<&mut MemberExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Member, and None otherwise.

Source

pub fn expect_member(self) -> MemberExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Member.

§Panics

Panics if the value is not Member, with a panic message including the content of self.

Source

pub fn member(self) -> Option<MemberExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Member, and None otherwise.

Source

pub const fn is_super_prop(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant SuperProp.

Source

pub fn as_super_prop(&self) -> Option<&SuperPropExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant SuperProp, and None otherwise.

Source

pub fn as_mut_super_prop(&mut self) -> Option<&mut SuperPropExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant SuperProp, and None otherwise.

Source

pub fn expect_super_prop(self) -> SuperPropExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of SuperProp.

§Panics

Panics if the value is not SuperProp, with a panic message including the content of self.

Source

pub fn super_prop(self) -> Option<SuperPropExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant SuperProp, and None otherwise.

Source

pub const fn is_cond(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Cond.

Source

pub fn as_cond(&self) -> Option<&CondExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Cond, and None otherwise.

Source

pub fn as_mut_cond(&mut self) -> Option<&mut CondExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Cond, and None otherwise.

Source

pub fn expect_cond(self) -> CondExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Cond.

§Panics

Panics if the value is not Cond, with a panic message including the content of self.

Source

pub fn cond(self) -> Option<CondExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Cond, and None otherwise.

Source

pub const fn is_call(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Call.

Source

pub fn as_call(&self) -> Option<&CallExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Call, and None otherwise.

Source

pub fn as_mut_call(&mut self) -> Option<&mut CallExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Call, and None otherwise.

Source

pub fn expect_call(self) -> CallExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Call.

§Panics

Panics if the value is not Call, with a panic message including the content of self.

Source

pub fn call(self) -> Option<CallExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Call, and None otherwise.

Source

pub const fn is_new(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant New.

Source

pub fn as_new(&self) -> Option<&NewExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant New, and None otherwise.

Source

pub fn as_mut_new(&mut self) -> Option<&mut NewExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant New, and None otherwise.

Source

pub fn expect_new(self) -> NewExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of New.

§Panics

Panics if the value is not New, with a panic message including the content of self.

Source

pub fn new(self) -> Option<NewExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant New, and None otherwise.

Source

pub const fn is_seq(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Seq.

Source

pub fn as_seq(&self) -> Option<&SeqExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Seq, and None otherwise.

Source

pub fn as_mut_seq(&mut self) -> Option<&mut SeqExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Seq, and None otherwise.

Source

pub fn expect_seq(self) -> SeqExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Seq.

§Panics

Panics if the value is not Seq, with a panic message including the content of self.

Source

pub fn seq(self) -> Option<SeqExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Seq, and None otherwise.

Source

pub const fn is_ident(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Ident.

Source

pub fn as_ident(&self) -> Option<&Ident>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Ident, and None otherwise.

Source

pub fn as_mut_ident(&mut self) -> Option<&mut Ident>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Ident, and None otherwise.

Source

pub fn expect_ident(self) -> Ident
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Ident.

§Panics

Panics if the value is not Ident, with a panic message including the content of self.

Source

pub fn ident(self) -> Option<Ident>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Ident, and None otherwise.

Source

pub const fn is_lit(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Lit.

Source

pub fn as_lit(&self) -> Option<&Lit>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Lit, and None otherwise.

Source

pub fn as_mut_lit(&mut self) -> Option<&mut Lit>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Lit, and None otherwise.

Source

pub fn expect_lit(self) -> Lit
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Lit.

§Panics

Panics if the value is not Lit, with a panic message including the content of self.

Source

pub fn lit(self) -> Option<Lit>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Lit, and None otherwise.

Source

pub const fn is_tpl(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Tpl.

Source

pub fn as_tpl(&self) -> Option<&Tpl>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Tpl, and None otherwise.

Source

pub fn as_mut_tpl(&mut self) -> Option<&mut Tpl>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Tpl, and None otherwise.

Source

pub fn expect_tpl(self) -> Tpl
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Tpl.

§Panics

Panics if the value is not Tpl, with a panic message including the content of self.

Source

pub fn tpl(self) -> Option<Tpl>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Tpl, and None otherwise.

Source

pub const fn is_tagged_tpl(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant TaggedTpl.

Source

pub fn as_tagged_tpl(&self) -> Option<&TaggedTpl>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant TaggedTpl, and None otherwise.

Source

pub fn as_mut_tagged_tpl(&mut self) -> Option<&mut TaggedTpl>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant TaggedTpl, and None otherwise.

Source

pub fn expect_tagged_tpl(self) -> TaggedTpl
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of TaggedTpl.

§Panics

Panics if the value is not TaggedTpl, with a panic message including the content of self.

Source

pub fn tagged_tpl(self) -> Option<TaggedTpl>

Available on crate feature ecma_ast only.

Returns Some if self is of variant TaggedTpl, and None otherwise.

Source

pub const fn is_arrow(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Arrow.

Source

pub fn as_arrow(&self) -> Option<&ArrowExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Arrow, and None otherwise.

Source

pub fn as_mut_arrow(&mut self) -> Option<&mut ArrowExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Arrow, and None otherwise.

Source

pub fn expect_arrow(self) -> ArrowExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Arrow.

§Panics

Panics if the value is not Arrow, with a panic message including the content of self.

Source

pub fn arrow(self) -> Option<ArrowExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Arrow, and None otherwise.

Source

pub const fn is_class(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Class.

Source

pub fn as_class(&self) -> Option<&ClassExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Class, and None otherwise.

Source

pub fn as_mut_class(&mut self) -> Option<&mut ClassExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Class, and None otherwise.

Source

pub fn expect_class(self) -> ClassExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Class.

§Panics

Panics if the value is not Class, with a panic message including the content of self.

Source

pub fn class(self) -> Option<ClassExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Class, and None otherwise.

Source

pub const fn is_yield_expr(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Yield.

Source

pub fn as_yield_expr(&self) -> Option<&YieldExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Yield, and None otherwise.

Source

pub fn as_mut_yield_expr(&mut self) -> Option<&mut YieldExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Yield, and None otherwise.

Source

pub fn expect_yield_expr(self) -> YieldExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Yield.

§Panics

Panics if the value is not Yield, with a panic message including the content of self.

Source

pub fn yield_expr(self) -> Option<YieldExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Yield, and None otherwise.

Source

pub const fn is_meta_prop(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant MetaProp.

Source

pub fn as_meta_prop(&self) -> Option<&MetaPropExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant MetaProp, and None otherwise.

Source

pub fn as_mut_meta_prop(&mut self) -> Option<&mut MetaPropExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant MetaProp, and None otherwise.

Source

pub fn expect_meta_prop(self) -> MetaPropExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of MetaProp.

§Panics

Panics if the value is not MetaProp, with a panic message including the content of self.

Source

pub fn meta_prop(self) -> Option<MetaPropExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant MetaProp, and None otherwise.

Source

pub const fn is_await_expr(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Await.

Source

pub fn as_await_expr(&self) -> Option<&AwaitExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Await, and None otherwise.

Source

pub fn as_mut_await_expr(&mut self) -> Option<&mut AwaitExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Await, and None otherwise.

Source

pub fn expect_await_expr(self) -> AwaitExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Await.

§Panics

Panics if the value is not Await, with a panic message including the content of self.

Source

pub fn await_expr(self) -> Option<AwaitExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Await, and None otherwise.

Source

pub const fn is_paren(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Paren.

Source

pub fn as_paren(&self) -> Option<&ParenExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Paren, and None otherwise.

Source

pub fn as_mut_paren(&mut self) -> Option<&mut ParenExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Paren, and None otherwise.

Source

pub fn expect_paren(self) -> ParenExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Paren.

§Panics

Panics if the value is not Paren, with a panic message including the content of self.

Source

pub fn paren(self) -> Option<ParenExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Paren, and None otherwise.

Source

pub const fn is_jsx_member(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant JSXMember.

Source

pub fn as_jsx_member(&self) -> Option<&JSXMemberExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant JSXMember, and None otherwise.

Source

pub fn as_mut_jsx_member(&mut self) -> Option<&mut JSXMemberExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant JSXMember, and None otherwise.

Source

pub fn expect_jsx_member(self) -> JSXMemberExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of JSXMember.

§Panics

Panics if the value is not JSXMember, with a panic message including the content of self.

Source

pub fn jsx_member(self) -> Option<JSXMemberExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant JSXMember, and None otherwise.

Source

pub const fn is_jsx_namespaced_name(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant JSXNamespacedName.

Source

pub fn as_jsx_namespaced_name(&self) -> Option<&JSXNamespacedName>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant JSXNamespacedName, and None otherwise.

Source

pub fn as_mut_jsx_namespaced_name(&mut self) -> Option<&mut JSXNamespacedName>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant JSXNamespacedName, and None otherwise.

Source

pub fn expect_jsx_namespaced_name(self) -> JSXNamespacedName
where Expr: Debug,

Available on crate feature 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.

Source

pub fn jsx_namespaced_name(self) -> Option<JSXNamespacedName>

Available on crate feature ecma_ast only.

Returns Some if self is of variant JSXNamespacedName, and None otherwise.

Source

pub const fn is_jsx_empty(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant JSXEmpty.

Source

pub fn as_jsx_empty(&self) -> Option<&JSXEmptyExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant JSXEmpty, and None otherwise.

Source

pub fn as_mut_jsx_empty(&mut self) -> Option<&mut JSXEmptyExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant JSXEmpty, and None otherwise.

Source

pub fn expect_jsx_empty(self) -> JSXEmptyExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of JSXEmpty.

§Panics

Panics if the value is not JSXEmpty, with a panic message including the content of self.

Source

pub fn jsx_empty(self) -> Option<JSXEmptyExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant JSXEmpty, and None otherwise.

Source

pub const fn is_jsx_element(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant JSXElement.

Source

pub fn as_jsx_element(&self) -> Option<&Box<JSXElement>>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant JSXElement, and None otherwise.

Source

pub fn as_mut_jsx_element(&mut self) -> Option<&mut Box<JSXElement>>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant JSXElement, and None otherwise.

Source

pub fn expect_jsx_element(self) -> Box<JSXElement>
where Expr: Debug,

Available on crate feature 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.

Source

pub fn jsx_element(self) -> Option<Box<JSXElement>>

Available on crate feature ecma_ast only.

Returns Some if self is of variant JSXElement, and None otherwise.

Source

pub const fn is_jsx_fragment(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant JSXFragment.

Source

pub fn as_jsx_fragment(&self) -> Option<&JSXFragment>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant JSXFragment, and None otherwise.

Source

pub fn as_mut_jsx_fragment(&mut self) -> Option<&mut JSXFragment>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant JSXFragment, and None otherwise.

Source

pub fn expect_jsx_fragment(self) -> JSXFragment
where Expr: Debug,

Available on crate feature 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.

Source

pub fn jsx_fragment(self) -> Option<JSXFragment>

Available on crate feature ecma_ast only.

Returns Some if self is of variant JSXFragment, and None otherwise.

Source

pub const fn is_ts_type_assertion(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant TsTypeAssertion.

Source

pub fn as_ts_type_assertion(&self) -> Option<&TsTypeAssertion>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant TsTypeAssertion, and None otherwise.

Source

pub fn as_mut_ts_type_assertion(&mut self) -> Option<&mut TsTypeAssertion>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant TsTypeAssertion, and None otherwise.

Source

pub fn expect_ts_type_assertion(self) -> TsTypeAssertion
where Expr: Debug,

Available on crate feature 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.

Source

pub fn ts_type_assertion(self) -> Option<TsTypeAssertion>

Available on crate feature ecma_ast only.

Returns Some if self is of variant TsTypeAssertion, and None otherwise.

Source

pub const fn is_ts_const_assertion(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant TsConstAssertion.

Source

pub fn as_ts_const_assertion(&self) -> Option<&TsConstAssertion>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant TsConstAssertion, and None otherwise.

Source

pub fn as_mut_ts_const_assertion(&mut self) -> Option<&mut TsConstAssertion>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant TsConstAssertion, and None otherwise.

Source

pub fn expect_ts_const_assertion(self) -> TsConstAssertion
where Expr: Debug,

Available on crate feature 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.

Source

pub fn ts_const_assertion(self) -> Option<TsConstAssertion>

Available on crate feature ecma_ast only.

Returns Some if self is of variant TsConstAssertion, and None otherwise.

Source

pub const fn is_ts_non_null(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant TsNonNull.

Source

pub fn as_ts_non_null(&self) -> Option<&TsNonNullExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant TsNonNull, and None otherwise.

Source

pub fn as_mut_ts_non_null(&mut self) -> Option<&mut TsNonNullExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant TsNonNull, and None otherwise.

Source

pub fn expect_ts_non_null(self) -> TsNonNullExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of TsNonNull.

§Panics

Panics if the value is not TsNonNull, with a panic message including the content of self.

Source

pub fn ts_non_null(self) -> Option<TsNonNullExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant TsNonNull, and None otherwise.

Source

pub const fn is_ts_as(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant TsAs.

Source

pub fn as_ts_as(&self) -> Option<&TsAsExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant TsAs, and None otherwise.

Source

pub fn as_mut_ts_as(&mut self) -> Option<&mut TsAsExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant TsAs, and None otherwise.

Source

pub fn expect_ts_as(self) -> TsAsExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of TsAs.

§Panics

Panics if the value is not TsAs, with a panic message including the content of self.

Source

pub fn ts_as(self) -> Option<TsAsExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant TsAs, and None otherwise.

Source

pub const fn is_ts_instantiation(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant TsInstantiation.

Source

pub fn as_ts_instantiation(&self) -> Option<&TsInstantiation>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant TsInstantiation, and None otherwise.

Source

pub fn as_mut_ts_instantiation(&mut self) -> Option<&mut TsInstantiation>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant TsInstantiation, and None otherwise.

Source

pub fn expect_ts_instantiation(self) -> TsInstantiation
where Expr: Debug,

Available on crate feature 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.

Source

pub fn ts_instantiation(self) -> Option<TsInstantiation>

Available on crate feature ecma_ast only.

Returns Some if self is of variant TsInstantiation, and None otherwise.

Source

pub const fn is_ts_satisfies(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant TsSatisfies.

Source

pub fn as_ts_satisfies(&self) -> Option<&TsSatisfiesExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant TsSatisfies, and None otherwise.

Source

pub fn as_mut_ts_satisfies(&mut self) -> Option<&mut TsSatisfiesExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant TsSatisfies, and None otherwise.

Source

pub fn expect_ts_satisfies(self) -> TsSatisfiesExpr
where Expr: Debug,

Available on crate feature 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.

Source

pub fn ts_satisfies(self) -> Option<TsSatisfiesExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant TsSatisfies, and None otherwise.

Source

pub const fn is_private_name(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant PrivateName.

Source

pub fn as_private_name(&self) -> Option<&PrivateName>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant PrivateName, and None otherwise.

Source

pub fn as_mut_private_name(&mut self) -> Option<&mut PrivateName>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant PrivateName, and None otherwise.

Source

pub fn expect_private_name(self) -> PrivateName
where Expr: Debug,

Available on crate feature 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.

Source

pub fn private_name(self) -> Option<PrivateName>

Available on crate feature ecma_ast only.

Returns Some if self is of variant PrivateName, and None otherwise.

Source

pub const fn is_opt_chain(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant OptChain.

Source

pub fn as_opt_chain(&self) -> Option<&OptChainExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant OptChain, and None otherwise.

Source

pub fn as_mut_opt_chain(&mut self) -> Option<&mut OptChainExpr>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant OptChain, and None otherwise.

Source

pub fn expect_opt_chain(self) -> OptChainExpr
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of OptChain.

§Panics

Panics if the value is not OptChain, with a panic message including the content of self.

Source

pub fn opt_chain(self) -> Option<OptChainExpr>

Available on crate feature ecma_ast only.

Returns Some if self is of variant OptChain, and None otherwise.

Source

pub const fn is_invalid(&self) -> bool

Available on crate feature ecma_ast only.

Returns true if self is of variant Invalid.

Source

pub fn as_invalid(&self) -> Option<&Invalid>

Available on crate feature ecma_ast only.

Returns Some if self is a reference of variant Invalid, and None otherwise.

Source

pub fn as_mut_invalid(&mut self) -> Option<&mut Invalid>

Available on crate feature ecma_ast only.

Returns Some if self is a mutable reference of variant Invalid, and None otherwise.

Source

pub fn expect_invalid(self) -> Invalid
where Expr: Debug,

Available on crate feature ecma_ast only.

Unwraps the value, yielding the content of Invalid.

§Panics

Panics if the value is not Invalid, with a panic message including the content of self.

Source

pub fn invalid(self) -> Option<Invalid>

Available on crate feature ecma_ast only.

Returns Some if self is of variant Invalid, and None otherwise.

Source§

impl Expr

Source

pub fn undefined(span: Span) -> Box<Expr>

Available on crate feature ecma_ast only.

Creates void 0.

Source

pub fn is_null(&self) -> bool

Available on crate feature ecma_ast only.
Source

pub fn leftmost(&self) -> Option<&Ident>

Available on crate feature ecma_ast only.
Source

pub fn is_ident_ref_to<S>(&self, ident: &S) -> bool
where Atom: PartialEq<S>, S: ?Sized,

Available on crate feature ecma_ast only.
Source

pub fn unwrap_with<'a, F>(&'a self, op: F) -> &'a Expr
where F: FnMut(&'a Expr) -> Option<&'a Expr>,

Available on crate feature ecma_ast only.

Unwraps an expression with a given function.

If the provided function returns Some, the function is called again with the returned value. If the provided functions returns None, the last expression is returned.

Source

pub fn unwrap_mut_with<'a, F>(&'a mut self, op: F) -> &'a mut Expr
where F: FnMut(&'a mut Expr) -> Option<&'a mut Expr>,

Available on crate feature ecma_ast only.

Unwraps an expression with a given function.

If the provided function returns Some, the function is called again with the returned value. If the provided functions returns None, the last expression is returned.

Source

pub fn unwrap_parens(&self) -> &Expr

Available on crate feature 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.

Source

pub fn unwrap_parens_mut(&mut self) -> &mut Expr

Available on crate feature 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.

Source

pub fn unwrap_seqs_and_parens(&self) -> &Expr

Available on crate feature ecma_ast only.

Normalize sequences and parenthesized expressions.

This returns the last expression of a sequence expression or the expression of a parenthesized expression.

Source

pub fn from_exprs(exprs: Vec<Box<Expr>>) -> Box<Expr>

Available on crate feature 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.

Source

pub fn directness_maters(&self) -> bool

👎Deprecated: Use directness_matters instead
Available on crate feature ecma_ast only.
Source

pub fn directness_matters(&self) -> bool

Available on crate feature ecma_ast only.

Returns true for eval and member expressions.

Source

pub fn with_span(self, span: Span) -> Expr

Available on crate feature ecma_ast only.
Source

pub fn set_span(&mut self, span: Span)

Available on crate feature ecma_ast only.

Trait Implementations§

Source§

impl Clone for Expr

Source§

fn clone(&self) -> Expr

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Expr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Expr

Source§

fn default() -> Expr

Returns the “default value” for a type. Read more
Source§

impl EndsWithAlphaNum for Expr

Source§

impl EqIgnoreSpan for Expr

Source§

fn eq_ignore_span(&self, other: &Expr) -> bool

Source§

impl ExprExt for Box<Expr>

Source§

fn as_expr(&self) -> &Expr

Source§

fn is_immutable_value(&self) -> bool

Returns true if this is an immutable value.
Source§

fn is_number(&self) -> bool

Source§

fn is_str(&self) -> bool

Source§

fn is_array_lit(&self) -> bool

Source§

fn is_nan(&self) -> bool

Checks if self is NaN.
Source§

fn is_undefined(&self, ctx: ExprCtx) -> bool

Source§

fn is_void(&self) -> bool

Source§

fn is_global_ref_to(&self, ctx: ExprCtx, id: &str) -> bool

Returns true if id references a global object.
Source§

fn is_one_of_global_ref_to(&self, ctx: ExprCtx, ids: &[&str]) -> bool

Returns true if id references a global object.
Source§

fn is_pure(&self, ctx: ExprCtx) -> bool

Source§

fn as_pure_bool(&self, ctx: ExprCtx) -> Value<bool>

Get bool value of self if it does not have any side effects.
Source§

fn cast_to_bool(&self, ctx: ExprCtx) -> (Purity, Value<bool>)

This method emulates the Boolean() JavaScript cast function. Note: unlike getPureBooleanValue this function does not return None for expressions with side-effects.
Source§

fn cast_to_number(&self, ctx: ExprCtx) -> (Purity, Value<f64>)

Source§

fn as_pure_number(&self, ctx: ExprCtx) -> Value<f64>

Emulates javascript Number() cast function. Read more
Source§

fn as_pure_string(&self, ctx: ExprCtx) -> Value<Cow<'_, str>>

Returns Known only if it’s pure.
Source§

fn get_type(&self, ctx: ExprCtx) -> Value<Type>

Apply the supplied predicate against all possible result Nodes of the expression.
Source§

fn is_pure_callee(&self, ctx: ExprCtx) -> bool

Source§

fn may_have_side_effects(&self, ctx: ExprCtx) -> bool

Source§

impl ExprExt for Box<Expr>

Source§

fn as_expr(&self) -> &Expr

Source§

fn is_valid_simple_assignment_target(&self, strict: bool) -> bool

“IsValidSimpleAssignmentTarget” from spec.
Source§

impl ExprExt for Expr

Source§

fn as_expr(&self) -> &Expr

Source§

fn is_immutable_value(&self) -> bool

Returns true if this is an immutable value.
Source§

fn is_number(&self) -> bool

Source§

fn is_str(&self) -> bool

Source§

fn is_array_lit(&self) -> bool

Source§

fn is_nan(&self) -> bool

Checks if self is NaN.
Source§

fn is_undefined(&self, ctx: ExprCtx) -> bool

Source§

fn is_void(&self) -> bool

Source§

fn is_global_ref_to(&self, ctx: ExprCtx, id: &str) -> bool

Returns true if id references a global object.
Source§

fn is_one_of_global_ref_to(&self, ctx: ExprCtx, ids: &[&str]) -> bool

Returns true if id references a global object.
Source§

fn is_pure(&self, ctx: ExprCtx) -> bool

Source§

fn as_pure_bool(&self, ctx: ExprCtx) -> Value<bool>

Get bool value of self if it does not have any side effects.
Source§

fn cast_to_bool(&self, ctx: ExprCtx) -> (Purity, Value<bool>)

This method emulates the Boolean() JavaScript cast function. Note: unlike getPureBooleanValue this function does not return None for expressions with side-effects.
Source§

fn cast_to_number(&self, ctx: ExprCtx) -> (Purity, Value<f64>)

Source§

fn as_pure_number(&self, ctx: ExprCtx) -> Value<f64>

Emulates javascript Number() cast function. Read more
Source§

fn as_pure_string(&self, ctx: ExprCtx) -> Value<Cow<'_, str>>

Returns Known only if it’s pure.
Source§

fn get_type(&self, ctx: ExprCtx) -> Value<Type>

Apply the supplied predicate against all possible result Nodes of the expression.
Source§

fn is_pure_callee(&self, ctx: ExprCtx) -> bool

Source§

fn may_have_side_effects(&self, ctx: ExprCtx) -> bool

Source§

impl ExprExt for Expr

Source§

fn as_expr(&self) -> &Expr

Source§

fn is_valid_simple_assignment_target(&self, strict: bool) -> bool

“IsValidSimpleAssignmentTarget” from spec.
Source§

impl<V> FoldWith<V> for Expr
where V: Fold + ?Sized,

Source§

fn fold_with(self, visitor: &mut V) -> Expr

Calls Fold::fold_expr with self.

Source§

fn fold_children_with(self, visitor: &mut V) -> Expr

Visit children nodes of self`` with visitor`.
Source§

impl<'ast> From<&'ast Expr> for NodeRef<'ast>

Source§

fn from(node: &'ast Expr) -> NodeRef<'ast>

Converts to this type from the input type.
Source§

impl From<&str> for Box<Expr>

Source§

fn from(src: &str) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<&str> for Expr

Source§

fn from(src: &str) -> Expr

Converts to this type from the input type.
Source§

impl From<(Atom, SyntaxContext)> for Box<Expr>

Source§

fn from(src: (Atom, SyntaxContext)) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<(Atom, SyntaxContext)> for Expr

Source§

fn from(src: (Atom, SyntaxContext)) -> Expr

Converts to this type from the input type.
Source§

impl From<ArrayLit> for Box<Expr>

Source§

fn from(src: ArrayLit) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<ArrayLit> for Expr

Source§

fn from(v: ArrayLit) -> Expr

Converts to this type from the input type.
Source§

impl From<ArrowExpr> for Box<Expr>

Source§

fn from(src: ArrowExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<ArrowExpr> for Expr

Source§

fn from(v: ArrowExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<AssignExpr> for Box<Expr>

Source§

fn from(src: AssignExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<AssignExpr> for Expr

Source§

fn from(v: AssignExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<Atom> for Box<Expr>

Source§

fn from(src: Atom) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Atom> for Expr

Source§

fn from(src: Atom) -> Expr

Converts to this type from the input type.
Source§

impl From<AwaitExpr> for Box<Expr>

Source§

fn from(src: AwaitExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<AwaitExpr> for Expr

Source§

fn from(v: AwaitExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<BigInt> for Box<Expr>

Source§

fn from(src: BigInt) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<BigInt> for Expr

Source§

fn from(src: BigInt) -> Expr

Converts to this type from the input type.
Source§

impl From<BigInt> for Box<Expr>

Source§

fn from(src: BigInt) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<BigInt> for Expr

Source§

fn from(src: BigInt) -> Expr

Converts to this type from the input type.
Source§

impl From<BinExpr> for Box<Expr>

Source§

fn from(src: BinExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<BinExpr> for Expr

Source§

fn from(v: BinExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<BindingIdent> for Box<Expr>

Source§

fn from(bi: BindingIdent) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Bool> for Box<Expr>

Source§

fn from(src: Bool) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Bool> for Expr

Source§

fn from(src: Bool) -> Expr

Converts to this type from the input type.
Source§

impl From<Box<Class>> for Box<Expr>

Source§

fn from(src: Box<Class>) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Box<Class>> for Expr

Source§

fn from(src: Box<Class>) -> Expr

Converts to this type from the input type.
Source§

impl From<Box<Function>> for Box<Expr>

Source§

fn from(src: Box<Function>) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Box<Function>> for Expr

Source§

fn from(src: Box<Function>) -> Expr

Converts to this type from the input type.
Source§

impl From<Box<JSXElement>> for Box<Expr>

Source§

fn from(src: Box<JSXElement>) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Box<JSXElement>> for Expr

Source§

fn from(v: Box<JSXElement>) -> Expr

Converts to this type from the input type.
Source§

impl From<CallExpr> for Box<Expr>

Source§

fn from(src: CallExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<CallExpr> for Expr

Source§

fn from(v: CallExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<Class> for Box<Expr>

Source§

fn from(src: Class) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Class> for Expr

Source§

fn from(src: Class) -> Expr

Converts to this type from the input type.
Source§

impl From<ClassExpr> for Box<Expr>

Source§

fn from(src: ClassExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<ClassExpr> for Expr

Source§

fn from(v: ClassExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<CondExpr> for Box<Expr>

Source§

fn from(src: CondExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<CondExpr> for Expr

Source§

fn from(v: CondExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<Cow<'_, str>> for Box<Expr>

Source§

fn from(src: Cow<'_, str>) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Cow<'_, str>> for Expr

Source§

fn from(src: Cow<'_, str>) -> Expr

Converts to this type from the input type.
Source§

impl From<Expr> for ExprOrSpread

Source§

fn from(src: Expr) -> ExprOrSpread

Converts to this type from the input type.
Source§

impl From<Expr> for VarDeclOrExpr

Source§

fn from(src: Expr) -> VarDeclOrExpr

Converts to this type from the input type.
Source§

impl From<FnExpr> for Box<Expr>

Source§

fn from(src: FnExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<FnExpr> for Expr

Source§

fn from(v: FnExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<Function> for Box<Expr>

Source§

fn from(src: Function) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Function> for Expr

Source§

fn from(src: Function) -> Expr

Converts to this type from the input type.
Source§

impl From<Ident> for Box<Expr>

Source§

fn from(src: Ident) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Ident> for Expr

Source§

fn from(v: Ident) -> Expr

Converts to this type from the input type.
Source§

impl From<IdentName> for Box<Expr>

Source§

fn from(src: IdentName) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<IdentName> for Expr

Source§

fn from(src: IdentName) -> Expr

Converts to this type from the input type.
Source§

impl From<Invalid> for Box<Expr>

Source§

fn from(src: Invalid) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Invalid> for Expr

Source§

fn from(v: Invalid) -> Expr

Converts to this type from the input type.
Source§

impl From<JSXElement> for Box<Expr>

Source§

fn from(src: JSXElement) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<JSXEmptyExpr> for Box<Expr>

Source§

fn from(src: JSXEmptyExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<JSXEmptyExpr> for Expr

Source§

fn from(v: JSXEmptyExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<JSXFragment> for Box<Expr>

Source§

fn from(src: JSXFragment) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<JSXFragment> for Expr

Source§

fn from(v: JSXFragment) -> Expr

Converts to this type from the input type.
Source§

impl From<JSXMemberExpr> for Box<Expr>

Source§

fn from(src: JSXMemberExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<JSXMemberExpr> for Expr

Source§

fn from(v: JSXMemberExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<JSXNamespacedName> for Box<Expr>

Source§

fn from(src: JSXNamespacedName) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<JSXNamespacedName> for Expr

Source§

fn from(v: JSXNamespacedName) -> Expr

Converts to this type from the input type.
Source§

impl From<JSXText> for Box<Expr>

Source§

fn from(src: JSXText) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<JSXText> for Expr

Source§

fn from(src: JSXText) -> Expr

Converts to this type from the input type.
Source§

impl From<Lit> for Box<Expr>

Source§

fn from(src: Lit) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Lit> for Expr

Source§

fn from(v: Lit) -> Expr

Converts to this type from the input type.
Source§

impl From<MemberExpr> for Box<Expr>

Source§

fn from(src: MemberExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<MemberExpr> for Expr

Source§

fn from(v: MemberExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<MetaPropExpr> for Box<Expr>

Source§

fn from(src: MetaPropExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<MetaPropExpr> for Expr

Source§

fn from(v: MetaPropExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<NewExpr> for Box<Expr>

Source§

fn from(src: NewExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<NewExpr> for Expr

Source§

fn from(v: NewExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<Null> for Box<Expr>

Source§

fn from(src: Null) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Null> for Expr

Source§

fn from(src: Null) -> Expr

Converts to this type from the input type.
Source§

impl From<Number> for Box<Expr>

Source§

fn from(src: Number) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Number> for Expr

Source§

fn from(src: Number) -> Expr

Converts to this type from the input type.
Source§

impl From<ObjectLit> for Box<Expr>

Source§

fn from(src: ObjectLit) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<ObjectLit> for Expr

Source§

fn from(v: ObjectLit) -> Expr

Converts to this type from the input type.
Source§

impl From<OptCall> for Box<Expr>

Source§

fn from(src: OptCall) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<OptCall> for Expr

Source§

fn from(src: OptCall) -> Expr

Converts to this type from the input type.
Source§

impl From<OptChainBase> for Expr

Source§

fn from(opt: OptChainBase) -> Expr

Converts to this type from the input type.
Source§

impl From<OptChainExpr> for Box<Expr>

Source§

fn from(src: OptChainExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<OptChainExpr> for Expr

Source§

fn from(v: OptChainExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<ParenExpr> for Box<Expr>

Source§

fn from(src: ParenExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<ParenExpr> for Expr

Source§

fn from(v: ParenExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<PrivateName> for Box<Expr>

Source§

fn from(src: PrivateName) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<PrivateName> for Expr

Source§

fn from(v: PrivateName) -> Expr

Converts to this type from the input type.
Source§

impl From<Regex> for Box<Expr>

Source§

fn from(src: Regex) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Regex> for Expr

Source§

fn from(src: Regex) -> Expr

Converts to this type from the input type.
Source§

impl From<SeqExpr> for Box<Expr>

Source§

fn from(src: SeqExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<SeqExpr> for Expr

Source§

fn from(v: SeqExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<SimpleAssignTarget> for Box<Expr>

Source§

fn from(s: SimpleAssignTarget) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Str> for Box<Expr>

Source§

fn from(src: Str) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Str> for Expr

Source§

fn from(src: Str) -> Expr

Converts to this type from the input type.
Source§

impl From<String> for Box<Expr>

Source§

fn from(src: String) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<String> for Expr

Source§

fn from(src: String) -> Expr

Converts to this type from the input type.
Source§

impl From<SuperPropExpr> for Box<Expr>

Source§

fn from(src: SuperPropExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<SuperPropExpr> for Expr

Source§

fn from(v: SuperPropExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<TaggedTpl> for Box<Expr>

Source§

fn from(src: TaggedTpl) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<TaggedTpl> for Expr

Source§

fn from(v: TaggedTpl) -> Expr

Converts to this type from the input type.
Source§

impl From<ThisExpr> for Box<Expr>

Source§

fn from(src: ThisExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<ThisExpr> for Expr

Source§

fn from(v: ThisExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<Tpl> for Box<Expr>

Source§

fn from(src: Tpl) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<Tpl> for Expr

Source§

fn from(v: Tpl) -> Expr

Converts to this type from the input type.
Source§

impl From<TsAsExpr> for Box<Expr>

Source§

fn from(src: TsAsExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<TsAsExpr> for Expr

Source§

fn from(v: TsAsExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<TsConstAssertion> for Box<Expr>

Source§

fn from(src: TsConstAssertion) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<TsConstAssertion> for Expr

Source§

fn from(v: TsConstAssertion) -> Expr

Converts to this type from the input type.
Source§

impl From<TsEnumRecordValue> for Expr

Source§

fn from(value: TsEnumRecordValue) -> Expr

Converts to this type from the input type.
Source§

impl From<TsInstantiation> for Box<Expr>

Source§

fn from(src: TsInstantiation) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<TsInstantiation> for Expr

Source§

fn from(v: TsInstantiation) -> Expr

Converts to this type from the input type.
Source§

impl From<TsNonNullExpr> for Box<Expr>

Source§

fn from(src: TsNonNullExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<TsNonNullExpr> for Expr

Source§

fn from(v: TsNonNullExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<TsSatisfiesExpr> for Box<Expr>

Source§

fn from(src: TsSatisfiesExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<TsSatisfiesExpr> for Expr

Source§

fn from(v: TsSatisfiesExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<TsTypeAssertion> for Box<Expr>

Source§

fn from(src: TsTypeAssertion) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<TsTypeAssertion> for Expr

Source§

fn from(v: TsTypeAssertion) -> Expr

Converts to this type from the input type.
Source§

impl From<UnaryExpr> for Box<Expr>

Source§

fn from(src: UnaryExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<UnaryExpr> for Expr

Source§

fn from(v: UnaryExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<UpdateExpr> for Box<Expr>

Source§

fn from(src: UpdateExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<UpdateExpr> for Expr

Source§

fn from(v: UpdateExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<YieldExpr> for Box<Expr>

Source§

fn from(src: YieldExpr) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<YieldExpr> for Expr

Source§

fn from(v: YieldExpr) -> Expr

Converts to this type from the input type.
Source§

impl From<bool> for Box<Expr>

Source§

fn from(src: bool) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<bool> for Expr

Source§

fn from(src: bool) -> Expr

Converts to this type from the input type.
Source§

impl From<f64> for Box<Expr>

Source§

fn from(src: f64) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<f64> for Expr

Source§

fn from(src: f64) -> Expr

Converts to this type from the input type.
Source§

impl From<usize> for Box<Expr>

Source§

fn from(src: usize) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<usize> for Expr

Source§

fn from(src: usize) -> Expr

Converts to this type from the input type.
Source§

impl Hash for Expr

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Node for Expr

Source§

fn emit_with<W, S>(&self, emitter: &mut Emitter<'_, W, S>) -> Result<(), Error>

Source§

impl OutputType for Box<Expr>

Source§

const IS_IDENT_REQUIRED: bool = false

Source§

fn is_fn_expr() -> bool

From babel.. Read more
Source§

fn finish_fn( _span: Span, ident: Option<Ident>, function: Box<Function>, ) -> Result<Box<Expr>, SyntaxError>

Source§

fn finish_class( _span: Span, ident: Option<Ident>, class: Box<Class>, ) -> Result<Box<Expr>, SyntaxError>

Source§

impl PartialEq for Expr

Source§

fn eq(&self, other: &Expr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Spanned for Expr

Source§

fn span(&self) -> Span

Get span of self.
Source§

fn span_lo(&self) -> BytePos

Source§

fn span_hi(&self) -> BytePos

Source§

impl StartsWithAlphaNum for Expr

Source§

impl Take for Expr

Source§

fn dummy() -> Expr

Create a dummy value of this type.
Source§

fn take(&mut self) -> Self

Source§

fn map_with_mut<F>(&mut self, op: F)
where F: FnOnce(Self) -> Self,

Mutate self using op, which accepts owned data.
Source§

impl<V> VisitMutWith<V> for Expr
where V: VisitMut + ?Sized,

Source§

fn visit_mut_with(&mut self, visitor: &mut V)

Calls VisitMut::visit_mut_expr with self.

Source§

fn visit_mut_children_with(&mut self, visitor: &mut V)

Visit children nodes of self`` with visitor`.
Source§

impl<V> VisitWith<V> for Expr
where V: Visit + ?Sized,

Source§

fn visit_with(&self, visitor: &mut V)

Calls Visit::visit_expr with self.

Source§

fn visit_children_with(&self, visitor: &mut V)

Visit children nodes of self`` with visitor`.
Source§

impl Eq for Expr

Source§

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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ExprFactory for T
where T: Into<Box<Expr>>,

Source§

fn as_arg(self) -> ExprOrSpread

Creates an ExprOrSpread using the given Expr. Read more
Source§

fn into_stmt(self) -> Stmt

Creates an expression statement with self.
Source§

fn into_return_stmt(self) -> ReturnStmt

Creates a statement whcih return self.
Source§

fn as_callee(self) -> Callee

Source§

fn as_iife(self) -> CallExpr

Source§

fn into_lazy_arrow(self, params: Vec<Pat>) -> ArrowExpr

create a ArrowExpr which return self Read more
Source§

fn into_lazy_fn(self, params: Vec<Param>) -> Function

create a Function which return self Read more
Source§

fn into_lazy_auto(self, params: Vec<Pat>, support_arrow: bool) -> Expr

Source§

fn into_var_decl(self, kind: VarDeclKind, name: Pat) -> VarDecl

create a var declartor using self as init Read more
Source§

fn into_new_expr(self, span: Span, args: Option<Vec<ExprOrSpread>>) -> NewExpr

Source§

fn apply(self, span: Span, this: Box<Expr>, args: Vec<ExprOrSpread>) -> Expr

Source§

fn call_fn(self, span: Span, args: Vec<ExprOrSpread>) -> Expr

Source§

fn as_call(self, span: Span, args: Vec<ExprOrSpread>) -> Expr

Source§

fn as_fn_decl(self) -> Option<FnDecl>

Source§

fn as_class_decl(self) -> Option<ClassDecl>

Source§

fn wrap_with_paren(self) -> Expr

Source§

fn make_eq<T>(self, right: T) -> Expr
where T: Into<Expr>,

Creates a binary expr $self ===
Source§

fn make_bin<T>(self, op: BinaryOp, right: T) -> Expr
where T: Into<Expr>,

Creates a binary expr $self $op $rhs
Source§

fn make_assign_to(self, op: AssignOp, left: AssignTarget) -> Expr

Creates a assign expr $lhs $op $self
Source§

fn make_member(self, prop: IdentName) -> MemberExpr

Source§

fn computed_member<T>(self, prop: T) -> MemberExpr
where T: Into<Box<Expr>>,

Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

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
Source§

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
Source§

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
Source§

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
Source§

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.
Source§

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.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SpanExt for T
where T: Spanned,

Source§

fn is_synthesized(&self) -> bool

Source§

fn starts_on_new_line(&self, format: ListFormat) -> bool

Source§

fn comment_range(&self) -> Span

Gets a custom text range to use when emitting comments.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

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
Source§

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
Source§

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
Source§

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
Source§

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
Source§

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
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> Send for T
where T: ?Sized,

Source§

impl<T> Sync for T
where T: ?Sized,

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 80 bytes

Size for each variant:

  • This: 12 bytes
  • Array: 40 bytes
  • Object: 40 bytes
  • Fn: 40 bytes
  • Unary: 32 bytes
  • Update: 32 bytes
  • Bin: 40 bytes
  • Assign: 80 bytes
  • Member: 48 bytes
  • SuperProp: 48 bytes
  • Cond: 40 bytes
  • Call: 72 bytes
  • New: 64 bytes
  • Seq: 40 bytes
  • Ident: 32 bytes
  • Lit: 40 bytes
  • Tpl: 64 bytes
  • TaggedTpl: 48 bytes
  • Arrow: 72 bytes
  • Class: 40 bytes
  • Yield: 32 bytes
  • MetaProp: 16 bytes
  • Await: 24 bytes
  • Paren: 24 bytes
  • JSXMember: 56 bytes
  • JSXNamespacedName: 48 bytes
  • JSXEmpty: 12 bytes
  • JSXElement: 16 bytes
  • JSXFragment: 56 bytes
  • TsTypeAssertion: 32 bytes
  • TsConstAssertion: 24 bytes
  • TsNonNull: 24 bytes
  • TsAs: 32 bytes
  • TsInstantiation: 32 bytes
  • TsSatisfies: 32 bytes
  • PrivateName: 24 bytes
  • OptChain: 32 bytes
  • Invalid: 12 bytes