Module formatter

Module formatter 

Source
Expand description

Format a Value into JAML text.

The main entry point is format() for standard use cases. For custom formatting options, use format_with_opts() with Options.

use jaml::{Value, format};

let value = Value::String("hello".to_string());
assert_eq!(format(&value), "\"hello\"");

// Custom formatting with advanced options
use jaml::formatter::{Options, format_with_opts};
let opts = Options::new().with_sort_keys(false);
let formatted = format_with_opts(&value, &opts);

Structs§

Options
Formatting options for JAML output.

Enums§

BinaryEncoding
Binary data encoding preference.
QuoteStyle
Quote style for strings and map keys.
TimestampPrecision
Precision for timestamp fractional seconds.

Functions§

format
Formats a JAML Value into an indentation-based string.
format_with_opts
Formats a JAML Value with custom formatting options.