Skip to main content

parse_set_field

Function parse_set_field 

Source
pub fn parse_set_field(input: &str) -> Result<(String, Value)>
Expand description

Parses a --set-field NAME=VALUE argument into a (name, value) pair.

The value is parsed as YAML when possible so --set-field "Points=8" becomes a number and --set-field "Enabled=true" becomes a bool. Values that fail to parse as YAML fall back to plain strings.