Enum beancount_parser::amount::Expression
source · #[non_exhaustive]
pub enum Expression {
Value(Value),
Operation(Operation),
}Expand description
An expression
Examples of expressions:
422 + 25 / (6 + (8 / 2))
The expression can be evaluated with Expression::evaluate
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Value(Value)
A direct value, the leaf of the expression tree
Operation(Operation)
An operation, made of two expression operands
Implementations§
Trait Implementations§
source§impl Clone for Expression
impl Clone for Expression
source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a copy 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 more