Skip to main content

to_string_pretty

Function to_string_pretty 

Source
pub fn to_string_pretty<T>(value: &T) -> Result<String>
where T: Serialize,
Expand description

Serializes a value to an indented EDN String.

Empty collections remain on one line and each item or map entry in a non-empty collection is indented by one tab per nesting level. Deeply nested subtrees fall back to compact formatting to bound indentation overhead.

ยงErrors

See crate::error::Error. Always returns Code::Serde.