pub enum Operator {
Show 31 variants
RootNode,
Add,
Sub,
Neg,
Mul,
Div,
Mod,
Exp,
Eq,
Neq,
Gt,
Lt,
Geq,
Leq,
And,
Or,
Not,
Assign,
AddAssign,
SubAssign,
MulAssign,
DivAssign,
ModAssign,
ExpAssign,
AndAssign,
OrAssign,
Tuple,
Chain,
Const {
value: Value,
},
VariableIdentifier {
identifier: String,
},
FunctionIdentifier {
identifier: String,
},
}
Expand description
An enum that represents operators in the operator tree.
Variants
RootNode
A root node in the operator tree. The whole expression is stored under a root node, as well as each subexpression surrounded by parentheses.
Add
A binary addition operator.
Sub
A binary subtraction operator.
Neg
A unary negation operator.
Mul
A binary multiplication operator.
Div
A binary division operator.
Mod
A binary modulo operator.
Exp
A binary exponentiation operator.
Eq
A binary equality comparator.
Neq
A binary inequality comparator.
Gt
A binary greater-than comparator.
Lt
A binary lower-than comparator.
Geq
A binary greater-than-or-equal comparator.
Leq
A binary lower-than-or-equal comparator.
And
A binary logical and operator.
Or
A binary logical or operator.
Not
A binary logical not operator.
Assign
A binary assignment operator.
AddAssign
A binary add-assign operator.
SubAssign
A binary subtract-assign operator.
MulAssign
A binary multiply-assign operator.
DivAssign
A binary divide-assign operator.
ModAssign
A binary modulo-assign operator.
ExpAssign
A binary exponentiate-assign operator.
AndAssign
A binary and-assign operator.
OrAssign
A binary or-assign operator.
Tuple
An n-ary tuple constructor.
Chain
An n-ary subexpression chain.
Const
Fields
value: Value
The value of the constant.
A constant value.
VariableIdentifier
Fields
identifier: String
The identifier of the variable.
A variable identifier.
FunctionIdentifier
Fields
identifier: String
The identifier of the function.
A function identifier.
Trait Implementations
impl StructuralPartialEq for Operator
Auto Trait Implementations
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnwindSafe for Operator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more