to_ron_string

Function to_ron_string 

Source
pub fn to_ron_string<T: SerializeRon>(value: &T) -> String
Expand description

Serialize any SerializeRon type to a RON string with default configuration.

This is a convenience function for quick serialization. For custom formatting options, use to_ron_string_with.

ยงExample

use ron2::ast::to_ron_string;
use ron2::Value;

let value = Value::Seq(vec![Value::Number(1.into()), Value::Number(2.into())]);
let ron = to_ron_string(&value);
// Output will be formatted with default settings