pub enum Expression {
Unary {
right: Box<Expression>,
operator: Operator,
},
Binary {
left: Box<Expression>,
right: Box<Expression>,
operator: Operator,
},
Ternary {
left: Box<Expression>,
middle: Box<Expression>,
right: Box<Expression>,
operator: Operator,
},
Array {
expressions: Vec<Expression>,
},
Literal {
value: Value,
},
Variable {
name: String,
},
Call {
name: String,
params: Vec<Expression>,
},
}Expand description
Variants§
Unary
An unary operation on a single Expression operand using an Operator
Binary
A binary operation on two Expression operands using an Operator.
Ternary
A ternary operation on three Expression operands using an Operator.
Array
A list of Expression values.
Fields
§
expressions: Vec<Expression>Literal
A literal Value.
Variable
A named external variable.
Call
A call to an external function with a list of Expression parameters.
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 PartialOrd for Expression
impl PartialOrd 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