Function serde_yaml::to_value
source · [−]Expand description
Convert a T
into serde_yaml::Value
which is an enum that can represent
any valid YAML data.
This conversion can fail if T
’s implementation of Serialize
decides to
return an error.
let val = serde_yaml::to_value("s").unwrap();
assert_eq!(val, Value::String("s".to_owned()));