Trait ConditionEvaluator

Source
pub trait ConditionEvaluator {
    // Required methods
    fn get_base_param(
        &self,
        name: &str,
    ) -> Result<(&str, &str), EvaluationError>;
    fn compare_final_values(
        &self,
        left_kind: &str,
        left_resolved_value: &str,
        operator: &ComparisonOperator,
        right_literal: &LiteralValue<'_>,
    ) -> Result<bool, EvaluationError>;
    fn get_kind_from_json_value(&self, value: &Value) -> String;
}
Expand description

The ConditionEvaluator trait defines methods for evaluating conditions in filter expressions.

Required Methods§

Source

fn get_base_param(&self, name: &str) -> Result<(&str, &str), EvaluationError>

Gets the raw string value and kind for a base variable name

Source

fn compare_final_values( &self, left_kind: &str, left_resolved_value: &str, operator: &ComparisonOperator, right_literal: &LiteralValue<'_>, ) -> Result<bool, EvaluationError>

Performs the final comparison between the left resolved value (after all path traversal) and the literal value

Source

fn get_kind_from_json_value(&self, value: &Value) -> String

Gets the chain-specific kind of a value from a JSON value

Implementors§