pub trait Expression:
AsAny
+ Send
+ Sync {
// Required methods
fn base(&self) -> &ExpressionBase;
fn evaluate(&self, params: &EvaluationContext<'_>) -> EvaluationResult;
fn each_child<'a>(&'a self, visit: &mut dyn FnMut(&'a dyn Expression));
fn equals(&self, other: &dyn Expression) -> bool;
fn possible_outputs(&self) -> Vec<Option<Value>>;
fn get_operator(&self) -> String;
// Provided methods
fn serialize(&self) -> MbglValue { ... }
fn get_kind(&self) -> Kind { ... }
fn get_type(&self) -> &Type { ... }
fn dependencies(&self) -> Dependency { ... }
fn has(&self, dep: Dependency) -> bool { ... }
}Expand description
expression::Expression.
Required Methods§
fn base(&self) -> &ExpressionBase
fn evaluate(&self, params: &EvaluationContext<'_>) -> EvaluationResult
fn each_child<'a>(&'a self, visit: &mut dyn FnMut(&'a dyn Expression))
Sourcefn equals(&self, other: &dyn Expression) -> bool
fn equals(&self, other: &dyn Expression) -> bool
operator==.
Sourcefn possible_outputs(&self) -> Vec<Option<Value>>
fn possible_outputs(&self) -> Vec<Option<Value>>
Statically analyze the expression, attempting to enumerate possible outputs. Returns an array of values plus the sentinel null optional value, used to indicate that the complete set of outputs is statically undecidable.
fn get_operator(&self) -> String
Provided Methods§
fn serialize(&self) -> MbglValue
fn get_kind(&self) -> Kind
fn get_type(&self) -> &Type
fn dependencies(&self) -> Dependency
Sourcefn has(&self, dep: Dependency) -> bool
fn has(&self, dep: Dependency) -> bool
Test the expression’s dependencies for any of one or more values.
Trait Implementations§
Source§impl Debug for dyn Expression
impl Debug for dyn Expression
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".