[−][src]Function serde_lexpr::to_value
pub fn to_value<T>(value: T) -> Result<Value> where
T: Serialize,
Convert a T
into lexpr::Value
which is an enum that can represent
any valid S-expression data.
This conversion can fail if T
's implementation of Serialize
decides to
return an error.
let val = serde_lexpr::to_value("s").unwrap(); assert_eq!(val, Value::string("s"));