Skip to main content

to_string_pretty

Function to_string_pretty 

Source
pub fn to_string_pretty<T: ToJson + ?Sized>(value: &T) -> Result<String, Error>
Expand description

Pretty-printed equivalent of to_string. Two-space indent, one space after :, newline between every element. Empty containers are kept compact ([] / {}).