pub fn value_to_hcl(v: &Value) -> ValueExpand description
Convert our Value into the hcl::Value shape hcl::eval consumes.
Numeric handling:
Value::Int→hcl::Number::from(i64)(no float widening).Value::Number→hcl::Number::from_f64(f), with NaN / ±Inf collapsing toHclValue::Nullbecausehcl::Numberrejects them. The collapse is pinned by a unit test below; callers who care can pre-filter.
Strings / lists / maps are recursive; insertion order is preserved on
Value::Map → hcl::Value::Object because hcl::Map is
indexmap::IndexMap.