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),
}

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

Returns true if self is of variant This.

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

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

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.

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

Returns true if self is of variant Array.

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

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

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.

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

Returns true if self is of variant Object.

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

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

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.

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

Returns true if self is of variant Fn.

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

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

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.

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

Returns true if self is of variant Unary.

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

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

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.

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

Returns true if self is of variant Update.

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

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

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.

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

Returns true if self is of variant Bin.

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

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

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.

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

Returns true if self is of variant Assign.

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

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

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.

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

Returns true if self is of variant Member.

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

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

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.

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

Returns true if self is of variant SuperProp.

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

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

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.

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

Returns true if self is of variant Cond.

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

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

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.

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

Returns true if self is of variant Call.

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

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

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.

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

Returns true if self is of variant New.

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

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

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.

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

Returns true if self is of variant Seq.

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

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

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.

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

Returns true if self is of variant Ident.

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

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

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.

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

Returns true if self is of variant Lit.

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

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

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.

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

Returns true if self is of variant Tpl.

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

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

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.

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

Returns true if self is of variant TaggedTpl.

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

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

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.

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

Returns true if self is of variant Arrow.

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

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

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.

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

Returns true if self is of variant Class.

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

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

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.

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

Returns true if self is of variant Yield.

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

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

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.

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

Returns true if self is of variant MetaProp.

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

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

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.

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

Returns true if self is of variant Await.

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

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

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.

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

Returns true if self is of variant Paren.

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

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

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.

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

Returns true if self is of variant JSXMember.

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

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

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.

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

Returns true if self is of variant JSXNamespacedName.

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

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

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.

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

Returns true if self is of variant JSXEmpty.

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

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

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.

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

Returns true if self is of variant JSXElement.

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

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

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.

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

Returns true if self is of variant JSXFragment.

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

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

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.

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

Returns true if self is of variant TsTypeAssertion.

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

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

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.

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

Returns true if self is of variant TsConstAssertion.

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

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

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.

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

Returns true if self is of variant TsNonNull.

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

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

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.

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

Returns true if self is of variant TsAs.

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

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

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.

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

Returns true if self is of variant TsInstantiation.

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

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

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.

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

Returns true if self is of variant TsSatisfies.

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

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

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.

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

Returns true if self is of variant PrivateName.

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

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

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.

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

Returns true if self is of variant OptChain.

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

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

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.

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

Returns true if self is of variant Invalid.

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

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

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.

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

Normalize parenthesized expressions.

This will normalize (foo), ((foo)), … to foo.

If self is not a parenthesized expression, it will be returned as is.

Normalize parenthesized expressions.

This will normalize (foo), ((foo)), … to foo.

If self is not a parenthesized expression, it will be returned as is.

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.

Returns true for eval and member expressions.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more
Get span of self.
Create a dummy value of this type.
Mutate self using op, which accepts owned data.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more