pub fn to_string<T: ToRonDocument>(value: &T) -> Result<String>Expand description
Serialize a value to a RON string with default formatting.
The output includes a #![type = "..."] attribute using core::any::type_name.
ยงExample
use ron2::{to_string, Value};
let value = Value::Bool(true);
let ron = ron2::to_string(&value)?;
assert!(ron.contains("#![type ="));
assert!(ron.contains("true"));