Skip to main content

ObjectType

Type Alias ObjectType 

Source
pub type ObjectType = VecMap<String, Value>;
Expand description

The object alternative of expression::Value.

Aliased Type§

pub struct ObjectType { /* private fields */ }

Trait Implementations§

Source§

impl ValueConverter for ObjectType

Source§

fn expression_type() -> Type

Source§

fn evaluate(expression: &Expr, context: &EvaluationContext<'_>) -> Option<Self>

Evaluates expression, of this type, to a Self: None when it fails or gives another type. The types that typed evaluation covers skip building a Value.
Source§

fn to_expression_value(&self) -> Value

Source§

fn from_expression_value(value: &Value) -> Option<Self>

Source§

fn vec_from_expression_value(value: &Value) -> Option<Vec<Self>>

Converts an array element-wise. The Color implementation also wraps a single color.