swc_ecma_ast

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

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

Returns true if self is of variant This.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_array(&self) -> bool

Returns true if self is of variant Array.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_object(&self) -> bool

Returns true if self is of variant Object.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_fn_expr(&self) -> bool

Returns true if self is of variant Fn.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_unary(&self) -> bool

Returns true if self is of variant Unary.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_update(&self) -> bool

Returns true if self is of variant Update.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_bin(&self) -> bool

Returns true if self is of variant Bin.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_assign(&self) -> bool

Returns true if self is of variant Assign.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_member(&self) -> bool

Returns true if self is of variant Member.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_super_prop(&self) -> bool

Returns true if self is of variant SuperProp.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_cond(&self) -> bool

Returns true if self is of variant Cond.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_call(&self) -> bool

Returns true if self is of variant Call.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_new(&self) -> bool

Returns true if self is of variant New.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_seq(&self) -> bool

Returns true if self is of variant Seq.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_ident(&self) -> bool

Returns true if self is of variant Ident.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_lit(&self) -> bool

Returns true if self is of variant Lit.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_tpl(&self) -> bool

Returns true if self is of variant Tpl.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_tagged_tpl(&self) -> bool

Returns true if self is of variant TaggedTpl.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_arrow(&self) -> bool

Returns true if self is of variant Arrow.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_class(&self) -> bool

Returns true if self is of variant Class.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_yield_expr(&self) -> bool

Returns true if self is of variant Yield.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_meta_prop(&self) -> bool

Returns true if self is of variant MetaProp.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_await_expr(&self) -> bool

Returns true if self is of variant Await.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_paren(&self) -> bool

Returns true if self is of variant Paren.

Source

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

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

Source

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

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

Source

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

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>

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

Source

pub const fn is_jsx_member(&self) -> bool

Returns true if self is of variant JSXMember.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_jsx_namespaced_name(&self) -> bool

Returns true if self is of variant JSXNamespacedName.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_jsx_empty(&self) -> bool

Returns true if self is of variant JSXEmpty.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_jsx_element(&self) -> bool

Returns true if self is of variant JSXElement.

Source

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

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

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

Source

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

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

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

Source

pub const fn is_jsx_fragment(&self) -> bool

Returns true if self is of variant JSXFragment.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_ts_type_assertion(&self) -> bool

Returns true if self is of variant TsTypeAssertion.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_ts_const_assertion(&self) -> bool

Returns true if self is of variant TsConstAssertion.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_ts_non_null(&self) -> bool

Returns true if self is of variant TsNonNull.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_ts_as(&self) -> bool

Returns true if self is of variant TsAs.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_ts_instantiation(&self) -> bool

Returns true if self is of variant TsInstantiation.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_ts_satisfies(&self) -> bool

Returns true if self is of variant TsSatisfies.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_private_name(&self) -> bool

Returns true if self is of variant PrivateName.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_opt_chain(&self) -> bool

Returns true if self is of variant OptChain.

Source

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

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>

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

Source

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

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>

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

Source

pub const fn is_invalid(&self) -> bool

Returns true if self is of variant Invalid.

Source

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

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

Source

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

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

Source

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

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>

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

Source§

impl Expr

Source

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

Creates void 0.

Source

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

Source

pub fn is_ident_ref_to(&self, ident: &str) -> bool

Source

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

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

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

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

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) -> &Self

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>

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

Returns true for eval and member expressions.

Source

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

Source

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

Trait Implementations§

Source§

impl<'arbitrary> Arbitrary<'arbitrary> for Expr

Source§

fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
Source§

fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
Source§

fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
Source§

impl Archive for Expr

Source§

type Archived = ArchivedExpr

The archived representation of this type. Read more
Source§

type Resolver = ExprResolver

The resolver for this type. It must contain all the additional information from serializing needed to make the archived type from the normal type.
Source§

unsafe fn resolve( &self, pos: usize, resolver: <Self as Archive>::Resolver, out: *mut <Self as Archive>::Archived, )

Creates the archived version of this value at the given position and writes it to the given output. Read more
Source§

impl Clone for Expr

Source§

fn clone(&self) -> Self

Returns a copy 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

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

impl Default for Expr

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Expr

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<__D: Fallible + ?Sized> Deserialize<Expr, __D> for Archived<Expr>

Source§

fn deserialize(&self, deserializer: &mut __D) -> Result<Expr, __D::Error>

Deserializes using the given deserializer
Source§

impl EqIgnoreSpan for Expr

Source§

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

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: Id) -> Box<Expr>

Converts to this type from the input type.
Source§

impl From<(Atom, SyntaxContext)> for Expr

Source§

fn from(src: Id) -> 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) -> Self

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) -> Self

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) -> Self

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) -> Self

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 Box<Expr>

Source§

fn from(src: BigIntValue) -> 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 Expr

Source§

fn from(src: BigIntValue) -> 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) -> Self

Converts to this type from the input type.
Source§

impl From<BindingIdent> for Box<Expr>

Source§

fn from(bi: BindingIdent) -> Self

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>) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

Converts to this type from the input type.
Source§

impl From<SimpleAssignTarget> for Box<Expr>

Source§

fn from(s: SimpleAssignTarget) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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) -> Self

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: Hasher>(&self, state: &mut __H)

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 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<__S> Serialize<__S> for Expr

Source§

fn serialize( &self, serializer: &mut __S, ) -> Result<<Self as Archive>::Resolver, __S::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl Serialize for Expr

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
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 Take for Expr

Source§

fn dummy() -> Self

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 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> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> ArchiveUnsized for T
where T: Archive,

Source§

type Archived = <T as Archive>::Archived

The archived counterpart of this type. Unlike Archive, it may be unsized. Read more
Source§

type MetadataResolver = ()

The resolver for the metadata of this type. Read more
Source§

unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )

Creates the archived version of the metadata for this value at the given position and writes it to the given output. Read more
Source§

unsafe fn resolve_unsized( &self, from: usize, to: usize, resolver: Self::MetadataResolver, out: *mut RelPtr<Self::Archived, <isize as Archive>::Archived>, )

Resolves a relative pointer to this value with the given from and to and writes it to the given output. 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> CallHasher for T
where T: Hash + ?Sized,

Source§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

Source§

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

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

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

impl<F, W, T, D> Deserialize<With<T, W>, D> for F
where W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

Source§

fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
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<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> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Gets the layout of the type.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The type for metadata in pointers and references to Self.
Source§

impl<T, S> SerializeUnsized<S> for T
where T: Serialize<S>, S: Serializer + ?Sized,

Source§

fn serialize_unsized( &self, serializer: &mut S, ) -> Result<usize, <S as Fallible>::Error>

Writes the object and returns the position of the archived type.
Source§

fn serialize_metadata(&self, _: &mut S) -> Result<(), <S as Fallible>::Error>

Serializes the metadata for the given type.
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> 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, 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<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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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,