pub enum Expression {
Show 15 variants
Literal(Literal),
Identifier(String),
MethodCall(MethodCall),
FieldAccess(FieldAccess),
ArrayAccess(ArrayAccess),
ArrayCreation(ArrayCreation),
New(NewExpression),
This,
Super,
Binary {
left: Box<Expression>,
op: String,
right: Box<Expression>,
},
Unary {
op: String,
expression: Box<Expression>,
},
Assignment {
left: Box<Expression>,
op: String,
right: Box<Expression>,
},
Update {
expression: Box<Expression>,
op: String,
is_prefix: bool,
},
Ternary {
condition: Box<Expression>,
then_branch: Box<Expression>,
else_branch: Box<Expression>,
},
Cast {
target_type: String,
expression: Box<Expression>,
},
}Expand description
表达式
Variants§
Literal(Literal)
字面量
Identifier(String)
变量引用
MethodCall(MethodCall)
方法调用
FieldAccess(FieldAccess)
字段访问
ArrayAccess(ArrayAccess)
数组访问
ArrayCreation(ArrayCreation)
数组创建
New(NewExpression)
New 表达式
This
This 表达式
Super
Super 表达式
Binary
二元运算
Unary
一元运算
Assignment
赋值运算
Update
自增自减运算
Ternary
三元运算
Cast
类型转换
Trait Implementations§
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Expression
impl Debug for Expression
Source§impl<'de> Deserialize<'de> for Expression
impl<'de> Deserialize<'de> for Expression
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for Expression
impl PartialEq for Expression
Source§impl Serialize for Expression
impl Serialize for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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