pub enum ExprKind {
Show 27 variants
Empty,
Closure(Closure),
Tuple(Tuple),
Structor(Structor),
Array(Array),
ArrayRep(ArrayRep),
AddrOf(AddrOf),
Quote(Quote),
Literal(Literal),
Group(Group),
Block(Block),
Assign(Assign),
Modify(Modify),
Binary(Binary),
Unary(Unary),
Member(Member),
Index(Index),
Cast(Cast),
Path(Path),
Let(Let),
Match(Match),
While(While),
If(If),
For(For),
Break(Break),
Return(Return),
Continue,
}
Expand description
Any of the different Expressions
Variants§
Empty
An empty expression: (
)
Closure(Closure)
Tuple(Tuple)
Structor(Structor)
A Struct creation expression: Path {
(Fielder ,
)* Fielder? }
Array(Array)
ArrayRep(ArrayRep)
An Array literal constructed with repeat syntax
[
Expr ;
Literal ]
AddrOf(AddrOf)
An address-of expression: &
mut
? Expr
Quote(Quote)
A backtick-quoted expression
Literal(Literal)
A Literal: 0x42, 1e123, 2.4, “Hello”
Group(Group)
Block(Block)
Assign(Assign)
Modify(Modify)
A Modify-assignment expression: Expr
(ModifyKind
Expr
)+
Binary(Binary)
A Binary expression: Expr
(BinaryKind
Expr
)+
Unary(Unary)
Member(Member)
A Member access expression: Expr
MemberKind
*
Index(Index)
An Array Index expression: a[10, 20, 30]
Cast(Cast)
Path(Path)
A path expression: ::
? PathPart (::
PathPart)*
Let(Let)
Match(Match)
While(While)
If(If)
For(For)
Break(Break)
Return(Return)
Continue
A continue expression: continue
Trait Implementations§
impl Eq for ExprKind
impl StructuralPartialEq for ExprKind
Auto Trait Implementations§
impl Freeze for ExprKind
impl RefUnwindSafe for ExprKind
impl Send for ExprKind
impl Sync for ExprKind
impl Unpin for ExprKind
impl UnwindSafe for ExprKind
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