pub enum AstExpr {
Show 35 variants
As(IdentWithToken, Shared<Node>),
Block(Program),
Call(IdentWithToken, SmallVec<[Shared<Node>; 4]>),
CallDynamic(Shared<Node>, SmallVec<[Shared<Node>; 4]>),
Def(IdentWithToken, Params, Program),
Macro(IdentWithToken, Params, Shared<Node>),
Fn(Params, Program),
Let(Pattern, Shared<Node>),
Loop(Program),
Var(Pattern, Shared<Node>),
Assign(IdentWithToken, Shared<Node>),
And(Vec<Shared<Node>>),
Or(Vec<Shared<Node>>),
Literal(Literal),
Ident(IdentWithToken),
InterpolatedString(Vec<StringSegment>),
Selector(Selector),
SelectorChain(SmallVec<[Selector; 4]>),
SelectorCall(Selector, SmallVec<[Shared<Node>; 4]>),
While(Shared<Node>, Program),
Foreach(IdentWithToken, Shared<Node>, Program),
If(SmallVec<[(Option<Shared<Node>>, Shared<Node>); 4]>),
Match(Shared<Node>, SmallVec<[MatchArm; 4]>),
Include(Literal),
Import(Literal),
Module(IdentWithToken, Program),
QualifiedAccess(Vec<IdentWithToken>, AccessTarget),
Self_,
Nodes,
Paren(Shared<Node>),
Quote(Shared<Node>),
Unquote(Shared<Node>),
Try(Shared<Node>, Shared<Node>),
Break(Option<Shared<Node>>),
Continue,
}Variants§
As(IdentWithToken, Shared<Node>)
Block(Program)
Call(IdentWithToken, SmallVec<[Shared<Node>; 4]>)
CallDynamic(Shared<Node>, SmallVec<[Shared<Node>; 4]>)
Def(IdentWithToken, Params, Program)
Macro(IdentWithToken, Params, Shared<Node>)
Fn(Params, Program)
Let(Pattern, Shared<Node>)
Loop(Program)
Var(Pattern, Shared<Node>)
Assign(IdentWithToken, Shared<Node>)
And(Vec<Shared<Node>>)
Or(Vec<Shared<Node>>)
Literal(Literal)
Ident(IdentWithToken)
InterpolatedString(Vec<StringSegment>)
Selector(Selector)
SelectorChain(SmallVec<[Selector; 4]>)
A sequence of selectors merged by the optimizer to reduce pipeline overhead.
Equivalent to applying each selector in order, but evaluated in a single
eval_expr call instead of N separate pipeline steps.
SelectorCall(Selector, SmallVec<[Shared<Node>; 4]>)
A selector with runtime-evaluated arguments for filtered matching.
Supports .h(1..2), .h(1, 2), .code("rust"), etc.
While(Shared<Node>, Program)
Foreach(IdentWithToken, Shared<Node>, Program)
If(SmallVec<[(Option<Shared<Node>>, Shared<Node>); 4]>)
Match(Shared<Node>, SmallVec<[MatchArm; 4]>)
Include(Literal)
Import(Literal)
Module(IdentWithToken, Program)
QualifiedAccess(Vec<IdentWithToken>, AccessTarget)
Self_
Nodes
Paren(Shared<Node>)
Quote(Shared<Node>)
Unquote(Shared<Node>)
Try(Shared<Node>, Shared<Node>)
Break(Option<Shared<Node>>)
Continue
Trait Implementations§
Source§impl PartialOrd for Expr
impl PartialOrd for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl !Send for Expr
impl !Sync for Expr
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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