encode

fun encode(summary: RunSummary): String(source)

Serialise summary to a TOML string, prefixed with the DOCUMENT_HEADER banner. Field order matches the declaration order on RunSummary; per-field @TomlComment annotations are emitted as # lines above each key, making the file self-documenting for anyone cracking it open in a text editor.