Trait tyche::expr::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§