Skip to main content

format_indented_ordered

Function format_indented_ordered 

Source
pub fn format_indented_ordered(
    id: &str,
    pairs: &[(&str, &str)],
    indent: &str,
) -> Result<String, FormatError>
Expand description

Format an object in indented Links Notation format, maintaining key order.

This is similar to format_indented but takes a slice of tuples to preserve the order of keys.

§Arguments

  • id - The object identifier (displayed on first line)
  • pairs - The key-value pairs in order
  • indent - The indentation string (default: 2 spaces)

§Returns

Formatted indented Links Notation string, or an error