Function consts_to_value

Source
pub fn consts_to_value(consts: Vec<ConstValue>) -> Value
Expand description

Converts a vector of constant values into a value variant by deducing the target type from the first element.

It traverses the provided vector, extracts the underlying primitive (boolean, integer, string, or float) for each constant, and collects the results into an allocated collection to form the corresponding value variant. For constant expressions and null values, the conversion remains unimplemented.