ron 0.1.7

Rusty Object Notation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Provides default pretty serialization with `to_string`.

use super::{Result, to_string_pretty};

use serde::ser::Serialize;
use std::default::Default;

/// Serializes `value` in the recommended RON layout with
/// default pretty configuration.
pub fn to_string<T>(value: &T) -> Result<String>
    where T: Serialize
{
    to_string_pretty(value, Default::default())
}