ExpressionLike

Trait ExpressionLike 

Source
pub trait ExpressionLike {
    // Required methods
    fn evaluate(&self, context: &mut dyn ContextLike) -> Result<Arc<Value>>;
    fn to_formula(&self) -> String;
}
Expand description

Core evaluation interface for expression AST nodes.

Implemented by all AIMX expression types to support serialization and evaluation against a ContextLike to produce a Value.

Required Methods§

Source

fn evaluate(&self, context: &mut dyn ContextLike) -> Result<Arc<Value>>

Evaluate this expression with the provided ContextLike, returning a Value or error.

Source

fn to_formula(&self) -> String

Implementors§