Skip to main content

coerce_values_toward

Function coerce_values_toward 

Source
pub fn coerce_values_toward(
    values: &[String],
    existing: Option<&Value>,
) -> DocumentResult<Value>
Expand description

Coerce a CLI value slice toward the type at existing via coerce_toward: one value becomes a scalar, several become an array whose elements are each coerced toward the existing array’s element type. An empty slice is an error.