pub trait HasOpType {
// Required methods
fn op_type(&self) -> OpType;
fn is_value(&self) -> bool;
fn is_unary(&self) -> bool;
fn is_additive(&self) -> bool;
fn is_multiplicative(&self) -> bool;
// Provided method
fn is_binary(&self) -> bool { ... }
}
Expand description
Trait that offers OpType
-related information
Required Methods§
sourcefn is_additive(&self) -> bool
fn is_additive(&self) -> bool
Checks whether this expression is an additive operation.
sourcefn is_multiplicative(&self) -> bool
fn is_multiplicative(&self) -> bool
Checks whether this expression is a multiplicative operation.