pub enum ExpressionKind {
Unary {
op: Spanned<UnaryExprOp>,
expr: Box<Expression>,
},
Paren(Parenthesized<Box<Expression>>),
Binary {
op: Spanned<BinaryExprOp>,
left: Box<Expression>,
right: Box<Expression>,
},
Ternary {
cond: Box<Expression>,
if_true: Box<Expression>,
if_false: Box<Expression>,
},
Path(Path),
Literal(Spanned<LitValue>),
Cast {
expr: Box<Expression>,
kw_as: Span,
ty: Type,
},
Call {
callee: Box<Expression>,
args: Parenthesized<Box<[Expression]>>,
},
ArrayAccess {
arr: Box<Expression>,
index: Box<Expression>,
closing_bracket: Span,
},
StructAccess {
st: Box<Expression>,
field: Spanned<Symbol>,
},
}Variants§
Unary
Paren(Parenthesized<Box<Expression>>)
Binary
Ternary
Path(Path)
Literal(Spanned<LitValue>)
Cast
Call
ArrayAccess
StructAccess
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExpressionKind
impl RefUnwindSafe for ExpressionKind
impl Send for ExpressionKind
impl Sync for ExpressionKind
impl Unpin for ExpressionKind
impl UnwindSafe for ExpressionKind
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