Trait HasOpType

Source
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§

Source

fn op_type(&self) -> OpType

Gets the type of this expression.

Source

fn is_value(&self) -> bool

Checks whether this expression is a single value.

Source

fn is_unary(&self) -> bool

Checks whether this expression is a unary operation.

Source

fn is_additive(&self) -> bool

Checks whether this expression is an additive operation.

Source

fn is_multiplicative(&self) -> bool

Checks whether this expression is a multiplicative operation.

Provided Methods§

Source

fn is_binary(&self) -> bool

Checks whether this expression is a binary (additive or multiplicative) operation.

Implementors§